Calling an Orcale Stored Procedure

sdebo2

Registered User.
Local time
Today, 22:58
Joined
Mar 12, 2001
Messages
20
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
 
The syntax I use to run an Oracle package is as follows:
BEGIN MY_PKGS.LOAD_MY_DATA(Parm); END;
Not an EXEC like in SQL Server.
Don't know if that will help.
 
Thank you that worked.
 

Users who are viewing this thread

Back
Top Bottom