|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: DBlib: telling if there are more rows pending, w/o blocking
Date: Jan 6 1999 3:46PM
>>>>> "David" == David C Worenklein writes:
David> I'm calling dbresults, then a bunch of dbnextrow's, but I don't
David> want to block.
David> I use dbpoll to tell me if there's data waiting for me. The
David> problem is, after I get the last row, dbpoll returns TIMEOUT,
David> so I don't know if I'm done with this result set, or if I'm
David> just waiting for Sybase to come back.
David> Is there a DB_ARE_THERE_MORE_ROWS_IN_THIS_RESULT_SET call?
I'm not sure that I understand the problem.
Given this:
while($dbh->dbresults != NO_MORE_RESULTS) {
while(@dat = $dbh->dbnextrow) {
....
}
}
where are you afraid that your script will block?
In general - once you've started to retrieve rows you won't block in
the dbnextrow() call.
You may block in the dbresults() call, I guess, but you can check
$dbh->DBMORECMDS to see if there are more result sets to be
processed...
Or am I completely missing the problem here?
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|