PDA

Click to See Complete Forum and Search --> : Calling Oracle Stored Proc in vb


rajivg
Nov 14th, 2001, 07:03 AM
Hi I have an existing vb dll. Earlier all the stored procedures were written in sqlserver.
But now i have to test in oracle platform using the same vb dll.

There are Oracle procedures which i want to call in the vb dll . how do i call it.
exec hierarchy_delete(id)--- this works fine in oracle while executing it. But in vb its giving me errors.

please let me know how to call Oracle stored procedures in vb.

thanks
rajiv

jim mcnamara
Nov 14th, 2001, 09:27 AM
Basically you have to have the correct Oracle Driver set and use SQLNET to connect to the Oracle instance. Regular ODBC connections do not support stored procedures.

Connect username/password
In the SQL statement use "EXECUTE storedprocedurename;"

If there there are bind variables use:
"EXECUTE storedprocedurename " & parameter1 &";"

You can also embed PL/SQL in the SQL statement