|
-
Sep 10th, 2004, 09:32 AM
#1
Thread Starter
Junior Member
can't run stored procedure
Hi Guys
I’m new to this forum thing.
I come from a VB6 background and am trying to get a VB.NET application to execute an Oracle Stored Procedure using ODBC connection. I keep getting the error message Invalid SQL statement. I know the stored procedure works as it is currently being used in a VB6 application so it must be the way I’m calling it. The code I am using is as follows:
Dim conn As New System.Data.Odbc.OdbcConnection
Dim ds As New DataSet
Try
conn.ConnectionString = "DSN=ABCD;uid=jonny;pwd=jonny"
conn.Open()
Dim mycmd As New OdbcCommand
mycmd.Connection = conn
mycmd.CommandText = "jonny"
mycmd.CommandType = CommandType.StoredProcedure
mycmd.ExecuteReader()
Catch x As Exception
MessageBox.Show(x.Message.ToString)
End Try
Has anyone any ideas what could be wrong.
Any help or suggestions would be greatly appreciated.
Thanks
Jonny
Last edited by jonnyreed; Sep 14th, 2004 at 05:52 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|