|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Error messages
Date: Oct 23 2001 4:48PM
Hayden Myers wrote:
>
> I'm seeing a few of these messages when I run my program. All the data
> from the database is making it's way into perl, however this message
> worries me a bit. I've been unable to find much on the net about this.
>
> DB-Library error:
> Attempt to initiate a new SQL Server operation with results
> pending.
This just means that your scripts aren't calling dbresults() until it
returns NO_MORE_RESULTS. Remember that some queries (in particular for
stored procedures) return more than one result set, so you should always
code a fetch loop like this:
while($dbh->dbresults != NO_MORE_RESULTS) {
while(@d = $dbh->dbnextrow) {
..... do stuff with the data in @d .....
}
}
Michael
|