Oracle ODBC stored procedure invocation.
Jakob Cederlund på UAB
jakob@REDACTED
Mon Jul 2 15:34:30 CEST 2001
At 16:24 2001-06-29 -0500, you wrote:
> > Hello All,
>
> I am as many of you may know by now working on a project that incolve
>ODBC through erlang. Progress is finnaly being made. It turns out though that
>we need not execute standard SQL statements but must instead invoke a stored
>procedure. I searched the documentation and found nothing mentioned about
>this operation. Does anyone know how to execute this operation. Sample code
>would be the most helpful to me.
> Thanks,
> Martin Logan
> Software Engineer, Vail Systems.
Hi there!
To execute a stored procedure in ODBC you have to options: either use a
normal SQLExecute or use a special SQL-something for running the procedure
(the name has slipped my memory). You usually use the former, and in the
case of Erlang ODBC, you have to.
How the procedure is invoked depends on whether your using Oracle or SQL
Server (or something else). It's simpler on SQL Server (as is everything):
Just do "execute my_stored_procedure", and the result is delivered in a
result set, returned as it should be by the server.
On Oracle, you have provide for the results in other ways. I'll check with
the Erlang ODBC programmer whether this is currently done. You use "begin
my_package.my_stored_procedure(...); end;" and execute this. How the result
is delivered depends on the ODBC driver. It is my belief that Oracle's ODBC
driver returns out array parameters in a result set, but I'm out on a limb
here.
Hope this helps.
/Jakob
More information about the erlang-questions
mailing list