ODBC application error

Ingela Anderton ingela@REDACTED
Wed Sep 28 16:14:15 CEST 2005


Without investigating this further I would just like to clarify one
thing. The Erlang odbc application is not a driver it is 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.

> Eshell V5.4.9  (abort with ^G)
> 1> application:start(odbc).
> ok
> 2> {ok, C} = odbc:connect("DSN=ourdatabase",[{auto_commit, off},
> {timeout, infinity}, {scrollable_cursors, off}, {trace_driver, off},
> {tuple_row, off}]).
> {ok,<0.42.0>}
> 3> odbc:sql_query(C, "select * from cosa", infinity).
> {selected,["c1","c2"],
>           [[1,"Hola"],
>            [12,"Holaa"],
>            [123,"Holaaa"],
>            [1234,"Holaaaa"],
>            [12345,"Holaaaaa"]]}
> 4> odbc:sql_query(C, "select * from cosa where c1=2", infinity).
> {selected,["c1","c2"],[]}
> 5> odbc:sql_query(C, "delete from cosa where c1=2", infinity).
> {error,"No SQL-driver information available."}
This query is sent directly to your odbc-driver without alterations.
The driver returns an error which is reflected in erlang by 
{error,"No SQL-driver information available."}
and unfortunately there is no information available in the driver
to help us understand why it failed.

-- 
/Ingela - OTP Team








More information about the erlang-questions mailing list