ODBC and Oracle

Sebastian Bello sebastian@REDACTED
Mon Aug 29 16:36:42 CEST 2005


Ingela,

it worked, thanks for your response.
Any advice regarding whether to use the Microsoft's or the Oracle's ODBC
driver?
    Sebastian-

----- Original Message -----
From: "Ingela Anderton" <ingela@REDACTED>
To: <sebastian@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Monday, August 29, 2005 9:40 AM
Subject: Re: ODBC and Oracle



Oracle is one of the databases that we test agains in our automated
test environment. The problem is probably that you have a 2.X driver.
It seems however that you can workaround this by disabling scrollable
cursors.

>From ODBC's User Guide:

1.4 About the Erlang ODBC application

 Provides an Erlang interface to communicate with relational
 SQL-databases. It is built on top of Microsofts ODBC interface and
 therefore requires that you have an ODBC driver to the database that
 you want to connect to. The Erlang ODBC application is designed using
 the version 3.0 of the ODBC-standard, however using the option
 {scrollable_cursors, off} for a connection has been known to make it
 work for at least some 2.X drivers.

--
/Ingela - OTP team

Sebastian Bello wrote:
> Hi list,
>
> has anybody worked accessing an Oracle (in my case 9i) database from
Erlang using ODBC?
> Using the Oracle driver I got the following error:
>
> odbc:connect(ConnStr, []).
> {error,connection_closed}
> (web@REDACTED)15>
> =CRASH REPORT==== 28-Aug-2005::20:09:37 ===
>   crasher:
>     pid: <0.721.0>
>     registered_name: []
>     error_info: {port_exit,collecting_of_driver_information_faild}
>     initial_call: {gen,init_it,
>                       [gen_server,
>                        <0.694.0>,
>                        <0.694.0>,
>                        odbc,
>                        [{client,<0.99.0>}],
>                        []]}
>     ancestors: [odbc_sup,<0.693.0>]
>     messages: [{'EXIT',#Port<0.808>,normal}]
>     links: [<0.694.0>]
>     dictionary: []
>     trap_exit: true
>     status: running
>     heap_size: 610
>     stack_size: 21
>     reductions: 1552
>   neighbours:
> (web@REDACTED)15>
> =SUPERVISOR REPORT==== 28-Aug-2005::20:09:37 ===
>      Supervisor: {local,odbc_sup}
>      Context:    child_terminated
>      Reason:     {port_exit,collecting_of_driver_information_faild}
>      Offender:   [{pid,<0.721.0>},
>                   {name,[]},
>                   {mfa,{odbc,start_link_sup,[[{client,<0.99.0>}]]}},
>                   {restart_type,temporary},
>                   {shutdown,7000},
>                   {child_type,worker}]
>
> Using the Microsoft drivers for Oracle (which seems not to support version
9i) I got the error
>
> odbc:connect(ConnString, []).
> {error,"No SQL-driver information available. Connection to database
failed."}
>
> Any suggestions?
> Thanks,
>     Sebastian-
>
>      Prepaid Expertise - Programmable Switches
>       Powered by Ericsson Licensed Technology
>       Sebastián Bello - Engineer - Development Center - IN Switch
Solutions Inc.
>       Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260
>       Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457
>       IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 /
emea@REDACTED
>       IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/
inswasia@REDACTED
>       e-mail: sebastian@REDACTED
>
>
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
charset=windows-1252"><BASE
> href=file://C:\local\firma\>
> <META content="MSHTML 6.00.2600.0" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=#ffffff
background=cid:001b01c5ac94$9f370e90$dc00a8c0@REDACTED>
> <DIV>Hi list,</DIV>
> <DIV> </DIV>
> <DIV>has anybody worked accessing an Oracle (in my case 9i) database from
Erlang
> using ODBC?</DIV>
> <DIV>Using the Oracle driver I got the following error:</DIV>
> <DIV> </DIV>
> <DIV><FONT color=#0000ff>odbc:connect(ConnStr,
> []).<BR>{error,connection_closed}<BR>(</FONT><A
> href="mailto:web@REDACTED)15">web@REDACTED)15</A><FONT
> color=#0000ff>><BR>=CRASH REPORT==== 28-Aug-2005::20:09:37
===<BR> 
> crasher:<BR>    pid: <0.721.0><BR>   
> registered_name: []<BR>    error_info:
> {port_exit,collecting_of_driver_information_faild}<BR>   
> initial_call:
>
{gen,init_it,<BR>         &nbsp
;           
>
[gen_server,<BR>          
            
>
<0.694.0>,<BR>         &n
bsp;            
>
<0.694.0>,<BR>         &n
bsp;            
>
odbc,<BR>           &
nbsp;          
>
[{client,<0.99.0>}],<BR>       &nbs
p;            &n
bsp; 
> []]}<BR>    ancestors:
> [odbc_sup,<0.693.0>]<BR>    messages:
> [{'EXIT',#Port<0.808>,normal}]<BR>    links:
> [<0.694.0>]<BR>    dictionary:
[]<BR>   
> trap_exit: true<BR>    status:
running<BR>   
> heap_size: 610<BR>    stack_size: 21<BR>   
> reductions: 1552<BR>  neighbours:<BR>(</FONT><A
> href="mailto:web@REDACTED)15">web@REDACTED)15</A><FONT
> color=#0000ff>><BR>=SUPERVISOR REPORT==== 28-Aug-2005::20:09:37
> ===<BR>     Supervisor:
> {local,odbc_sup}<BR>     Context:   
> child_terminated<BR>    
Reason:    
>
{port_exit,collecting_of_driver_information_faild}<BR>   &nbs
p;
> Offender:  
>
[{pid,<0.721.0>},<BR>        &
nbsp;        
>
{name,[]},<BR>          &n
bsp;      
>
{mfa,{odbc,start_link_sup,[[{client,<0.99.0>}]]}},<BR>  &nbs
p;            &n
bsp; 
>
{restart_type,temporary},<BR>       &nbsp
;         
>
{shutdown,7000},<BR>         &n
bsp;       
> {child_type,worker}]</FONT></DIV>
> <DIV> </DIV>
> <DIV>Using the Microsoft drivers for Oracle (which seems not to support
version
> 9i) I got the error</DIV>
> <DIV> </DIV>
> <DIV><FONT color=#0000ff>odbc:connect(ConnString, []).<BR>{error,"No
SQL-driver
> information available. Connection to database failed."}</FONT></DIV>
> <DIV> </DIV>
> <DIV>
> <DIV>Any suggestions?</DIV>
> <DIV>Thanks,</DIV>
> <DIV>    Sebastian-</DIV></DIV>
> <DIV> </DIV>
> <DIV>
> <TABLE width="77%" border=0>
>   <TBODY>
>   <TR>
>     <TD vAlign=top width="16%"><IMG
>       src="cid:001a01c5ac94$9f2fe2a0$dc00a8c0@REDACTED"></TD>
>     <TD vAlign=top width="84%">
>       <P><B><FONT face=Verdana color=#000099 size=1>Prepaid Expertise -
>       Programmable Switches <BR>Powered by Ericsson Licensed
>       Technology<BR>Sebastián Bello - Engineer - Development Center - IN
Switch
>       Solutions Inc.<BR>Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax:
>       1305-7686260<BR>Development Center - Montevideo - Uruguay Tel/Fax:
>       5982-7104457<BR>IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0
4
>       93655773 / emea@REDACTED<BR>IN SWITCH ASIA Phone: +92 51
2800397/8-
>       Fax: +92 51 2800399/ inswasia@REDACTED<BR>e-mail:
>       sebastian@REDACTED</FONT><FONT face=Verdana color=blue
>       size=1><BR></FONT></B></P></TD></TR></TBODY></TABLE><B><FONT
face=Verdana
> color=blue size=1></FONT></B></DIV>  </BODY></HTML>












More information about the erlang-questions mailing list