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