Hi,
I am relatively new to the world of Perl and am experiencing some problems executing a
particular Sybase stored procedure.
Basically, when the stored procedure is executed, the update occurs fine, but any
subsequent database calls produce the following error:
DB-Library error: Attempt to initiate a new SQL Server operation with results pending.
The code that does the last working update looks like...
$dbh->dbcmd($command);
$result = $dbh->dbsqlexec;
if ($result == 0)
{
&errLog("Could not add file date to downloads table");
return $ERROR;
}
# while ($dbh->dbresults != NO_MORE_RESULTS)
# {
# &debugLog("throw away results");
# }
$retVal = $dbh->dbretstatus;
If I uncomment the commented block, the aforementioned error is produced an infinite
number of times, filling up my error log.
So you see, the problem is that I can't discard the result sets, but their presence
prevents any further database activity.
Any ideas? I have spent a whole day looking at this and have made no inroads.
Regards,
Craig
**********************************************************************
***** IMPORTANT INFORMATION *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
St.George is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
delay in its receipt.
**********************************************************************