Results 1 to 7 of 7

Thread: can't run stored procedure

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2004
    Location
    Belfast
    Posts
    16

    Thumbs down 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
  •  



Click Here to Expand Forum to Full Width