|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: sybperl 2.13_08 (BLK routines)
Date: Oct 2 2001 4:14PM
I've just placed sybperl 2.13_08 on http://www.peppler.org/downloads
For those who are interested this version adds a few of the blk_*()
calls so that you can use the Client Library Bulk-Copy API to copy
data from perl variables to Sybase tables. The API goes something like
this:
my $dbh = new Sybase::CTlib $user, $pwd, $server, $appname,
{ CON_PROPS => { CS_BULK_LOGIN => CS_TRUE }};
$dbh->blk_init("testdb..blk_test", 4, 0); # blk_test has 4 colums
$dbh->blk_rowxfer(["one", 123, 456.76, "some other data"]);
.... add other rows with blk_rowxfer()....
$dbh->blk_done(Sybase::CTlib::CS_BLK_ALL, $rows);
print "Transfered $rows rows\n";
$dbh->blk_drop;
There are no doubt bugs with this stuff - in particular I haven't
really validated identity column handling, so use with care!
Michael
--
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
|