ODBC issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ODBC issues

Joakim Hirsch
Looks as if the odbc supervisor process (odbc_sup) isn't running.
Did you start the application?
application:start(odbc).


Joakim Hirsch



> Date: Thu, 28 Jun 2001 15:11:05 -0500
> From: Martin Logan <martin>
> X-Accept-Language: en
> MIME-Version: 1.0
> To: "erlang-questions" <erlang-questions>
> Subject: ODBC issues
> Content-Transfer-Encoding: 7bit
>
> I am currently writing a proxy that uses ODBC modules. I have all of the
> necessary components for ODBC installed on a slackware linux machine.  I
> am however getting some strange behavior from when I try to start the
> ODBC processes from within the shell. Below is the output from the shell
> when I try to start the server.
>
>
> (martin)5> {ok, _Pid} = odbc:start_link({local, odbc1}, [], []).
> ** exited: {noproc,{gen_server,call,
>                                [odbc_sup,
>                                 {start_child,
>
> [{local,odbc1},[{client,<0.46.0>}],[]]},
>                                 infinity]}} **
>
> After executing the above command the ODBC module apears to be in the
> system as I can type "o" and tab and I see that odbc is one  of the
> options that is available. If anyone knows of an explanation for this
> please let me know.
>
>                     Thanks,
>                     Martin Logan
>                     Software Engineer, Vail Systems.
>



Reply | Threaded
Open this post in threaded view
|

Oracle ODBC stored procedure invocation.

Martin Carlson-2
> 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.




Reply | Threaded
Open this post in threaded view
|

Oracle ODBC stored procedure invocation.

Jakob Praher
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