[unixODBC-support] DBD::ODBC::st fetchrow_hashref failed: Unable to fetch information about the error

eric.berg at barclayscapital.com eric.berg at barclayscapital.com
Fri Apr 15 20:06:15 BST 2011

Perl 5.12.3
DBI 1.11
DBD::ODBC 1.29
FreeTDS 0.83 and 0.91
unixODBC 2.3.0
MS SQL Server  2008

I'm running a stored procedure and getting the following message:

DBD::ODBC::st fetchrow_hashref failed:     Unable to fetch information about the error

This code generates this error:

I get a dbh with a simple odbc dsn:  dbi:ODBC:MSSQL
my $sql = "EXECUTE point_port..api_IRunCommit NULL, 13272";
my $sth = $dbh->prepare($sql);
warn "Errors: " . $sth->errstr . "\n";
while ( my $stuff = $sth->fetchrow_hashref() ) {
    warn Dumper($stuff);

It dies on the first iteration of the while loop.  Here's what I get:

Errors: [FreeTDS][SQL Server]Apr 15 2011  3:00:42:683PM - nothing to commit (SQL-01000)
[FreeTDS][SQL Server]Apr 15 2011  3:00:42:683PM : rows affected          1 - calculated max_range (SQL-01000)
[FreeTDS][SQL Server]Apr 15 2011  3:00:42:680PM : rows affected          1 - UPDATE  point_hist..pricing_request (SQL-01000)
[FreeTDS][SQL Server]Apr 15 2011  3:00:42:680PM - cleared old bad records (SQL-01000)
[FreeTDS][SQL Server]Apr 15 2011  3:00:42:673PM : rows affected          1 - retrieved old max (SQL-01000)

DBD::ODBC::st fetchrow_hashref failed:     Unable to fetch information about the error

Any thoughts on why this happens in some cases.  Plenty of other stuff works, including other stored procedures.  Would a bad return value from my sproc cause this?

Also, notice that that information that is basically from the sp_trace output from my stored procedures isn't printed, except when I explicitly print $sth->errstr.




This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20110415/2a659ca7/attachment.html>

More information about the unixODBC-support mailing list