[erlang-questions] odbc:sql_query/2 problem

Ingela Anderton ingela@REDACTED
Fri Oct 20 17:17:59 CEST 2006



> I'm using erlang 5.4.3
> Using ODBC, I'm using Store Procedure (SP) which first updates and then
> selects contents in a table.
> The function odbc:sql_query/2 is returning {error,"No SQL driver information
> avaiable" }.
> ( The same SP is perfectly working in MS SQL query analyser)
> If Ichange the order of operation of  SP such that it first select the and
> then update the contents, the function odbc:sql_query/2 is working
> perfectly.
> Is it a bug in erlang?

A bug perhaps, in erlang no. It could be a bug in the erlang odbc port
program. My guess would be that the order of the operations in the
stored procedure effects the return value from the odbc c-API function
SQLExecDirect, and in the case where an error is returned the
SQLExecDirect function returns some sort of "special case success" that
is not handled by the odbc port program. This is my guess. If you
would be able to write a small c-program to find out what is returned
for your stored procedure maybe we could find out if I am right.
That is the best I can do from the information provide.

-- 
Ingela

Ericsson AB - OTP team









More information about the erlang-questions mailing list