VictorMV has asked for the wisdom of the Perl Monks concerning the following question:

When using DBI (ver 1.46) to execute a stored procedure on SQLServer via DBD-ODBC (ver 1.13) I get the following error: Microsoft ODBC SQL Server Driver Function sequence error (SQL-HY010)(DBD: st_fetch/SQLFetch err=-1) When I explicitly run the stored procedure from within an SQL Client (DBArtisan) I get a more descriptive error message and I would like to get that same message passed to perl via DBI. When I try to access errstr to get the error text, I get the above mentioned 'Function sequence error' - is there a workaround, or some other way to get the error? Is this a problem with DBI ver 1.46? Thanks a lot!

Replies are listed 'Best First'.
Re: Function sequence error
by talexb (Chancellor) on Dec 14, 2007 at 21:06 UTC

    At a guess,

      You may also get a function sequence error if you attempt another SQLExecute call before SQLMoreResults() has returned SQL_NO_DATA_FOUND.

    .. may be the answer you seek. That's from this page which I found using Google.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds