PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Sybperl 2.09_05
Date: Jun 13 1998 5:46PM

I've just added dbsqlsend() and dbpoll() to Sybase::DBlib, and applied
W. Phillip Moore's patch to Sybase::DBlib::nsql().

With dbsqlsend(), dbsqlok() and dbpoll() it is now possible to execute 
queries asynchronously. For example you could do this if you needed to 
run queries on multiple servers at the same time:

$dbh->dbcmd($sql);
$dbh->dbsqlsend;
$dbh2->dbcmd($sql);
$dbh2->dbsqlsend
$dbh3->dbcmd($sql);
$dbh3->dbsqlsend;
while(($dbhR, $reason) = Sybase::DBlib::dbpoll(-1)) {
   if($dbhR) {
	$dbhR->dbsqlok;
        while($dbhR->dbresults != NO_MORE_RESULTS) {
	   while(@dat = $dbhR->dbnextrow) {
		...
	   }
	}
   }
}

I've not really used this technique myself, but this should work. You
can pick up the new version from http://www.mbay.net/~mpeppler.

If you use dbpoll() and friends please report back any success or
failure so that I can improve on this if necessary.

Michael

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com