ODBC application error

Ingela Anderton ingela@REDACTED
Wed Sep 28 17:32:13 CEST 2005


Laura M. Castro wrote:
> >>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.
> 
>     Of course it is not my intention to call into question your words,
> but if that is the case, I just can not understand why using the isql
> tool the DELETE statement performs correctly and returns just
> "SQLRowCount returns 0", as it does after a simply empty-result SQL
> SELECT statement, but fails using Erlang ODBC application...
Well then that is strange! I am only saying this seems to be in the
driver but it would not be the first time though something
that should not affect something turns out to do so ;). If that is the
case still needs to be investigate. Alas I have no time to look in to
this any further at the moment.  Maybe you could write a small
c-program to access the driver via the same interface as erlang odbc
and see what SQLExecDirect returns for your particular query.
One potential problem I can see is if it returns SQL_SUCCESS_WITH_INFO
as this has been used to indicate an error in the user input by
drivers in this particular situation. I no longer recall exactly what
the odbc standard says about this, but we have a comment in the code
stating this to be the case, and only SQL_SUCCESS is considered to
be correct. Maybe this could be a problem of different interpretations
of the standard. If you find anything out please let me know.

-- 
/m.v.h Ingela - OTP team









More information about the erlang-questions mailing list