ODBC application error

Laura M. Castro <>
Wed Sep 28 17:39:46 CEST 2005


  Hello Michael,

> Maybe it makes a difference if UID/PWD is in odbc:connect call rather
> than ODBC files.  I do not know, maybe worth trying.

    Thanks for your comment. Indeed our connection string is more
similar to yours, but that is not the key for the problem :-(. As I said
before, in my opinion it may be something related to DELETE statements
that in the end do not delete anything at all, because I can perform a
slightly modified test this way:

Erlang (BEAM) emulator version 5.4.9 [hipe]

Eshell V5.4.9  (abort with ^G)
1> application:start(odbc).
ok
2> {ok, C} =
odbc:connect("DSN=ourdatabase;UID=ouruser;PWD=ourpass",[{auto_commit,
off},{timeout, infinity}, {scrollable_cursors, off}, {trace_driver,
off},{tuple_row, off}]).
{ok,<0.44.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=1", infinity).
{updated,1}

6> odbc:sql_query(C, "delete from cosa where c1=2", infinity).
{error,"No SQL-driver information available."}


    And, as you can see, we get the same error, but not in the case in
which the DELETE statement succeeded in deleting "something". In my
opinion, the expectable behaviour would be:

6> odbc:sql_query(C, "delete from cosa where c1=2", infinity).
{updated,0}

    Regards,

	Laura Castro



More information about the erlang-questions mailing list