Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to run a Stored Procedure using VB.NET and ODBC ?

394330May 27 2003 — edited May 27 2003
Hello,

I need to run a Stored Procedure using ODBC with VB.NET but I get the following error:

[42000][Microsoft][ODBC Driver for Oracle][Oracle]ORA-00900: Invalid Sql-Statement

This is my Connection and Command:

Dim co As New OdbcConnection
("DSN=Test;UID=test;PWD=test;SERVER=aiv;")
Dim blobCmd As New OdbcCommand("InsertBlob")

This Stored Procedure has two parameters: Number and a varchar2. This is the rest of the code:

co.Open()
blobCmd.Connection = co
blobCmd.CommandType = CommandType.StoredProcedure
blobCmd.Parameters.Add("p_Id", OdbcType.Int, 20).Value = a
blobCmd.Parameters.Add("p_FileName", OdbcType.Char,100)
.Value = TextBox2.Text
blobCmd.ExecuteNonQuery()
co.Close()

Best Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2003
Added on May 27 2003
1 comment
5,148 views