I am trying to call an Oracle stored procedure from VBA on a form. The Procedure takes 1 parameter and does not return anything, it just validates data and update some tables. I have search this forum, help and Microsoft support and am confused on how to accomplish this. Below is the code I have, but it is returning an error (ORA-00900: invalid SQL statement). This procedure works from SQL-plus, and I do have an ODBC setup for this database.
Private Sub Form_Load()
Dim vw As ADODB.Connection
Set vw = New ADODB.Connection
Dim rs As ADODB.Recordset
Dim vsql As String
Dim query As String
' Open a connection using an ODBC.
vw.ConnectionString = "UID=userName;PWD=password;DRIVER={Microsoft ODBC for Oracle};" _
& "SERVER=server;"
vw.Open
‘Call Stored Procedure
vw.Execute ("exec shipvalidatestart(‘sdebo2’);")
vw.Close
I am using Access 2002, and started with a blank database, not a project.
Thanks for your help it is appreciated.
Scott
Private Sub Form_Load()
Dim vw As ADODB.Connection
Set vw = New ADODB.Connection
Dim rs As ADODB.Recordset
Dim vsql As String
Dim query As String
' Open a connection using an ODBC.
vw.ConnectionString = "UID=userName;PWD=password;DRIVER={Microsoft ODBC for Oracle};" _
& "SERVER=server;"
vw.Open
‘Call Stored Procedure
vw.Execute ("exec shipvalidatestart(‘sdebo2’);")
vw.Close
I am using Access 2002, and started with a blank database, not a project.
Thanks for your help it is appreciated.
Scott