On Tue, 2004-06-29 at 00:31, Tim Bunce wrote:
> A release candidate for DBI 1.43 is available for testing at:
>
> http://homepage.eircom.net/~timbunce/DBI-1.43-rc1-20040628.tar.gz
>
> =head1 CHANGES in DBI 1.43 (svn rev 373), 28th June 2004
>
> Fixed last_insert_id(...) usage check thanks to Rudy Lippan.
Hmmm.
I've got last_insert_id() in DBD::Sybase::db, but it doesn't get called
from the dispatcher.
DBI 1.43-ithread default trace level set to 0x0/10 (pid 2880)
Note: perl is running without the recommended perl -w option
>> last_insert_id DISPATCH (DBI::db=HASH(0xa0c926c) rc1/1 @5 g0
ima2101 pid#2880) at t/main.t line 166
not ok 17
The code:
if($DBI::VERSION > 1.42) {
# This will only work w/ DBI >= 1.43
$dbh->do("create table #idtest(id numeric(9,0) identity, c
varchar(20))");
$dbh->do("insert #idtest (c) values ('123456')");
DBI->trace(10);
my $value = $dbh->last_insert_id(undef,undef,undef,undef);
if($value > 0) {
print "ok 17\n";
} else {
print "not ok 17\n";
}
DBI->trace(0);
}
This worked when I applied Rudy's patch (in particular the O=>0x2820 vs.
O=>0x2100) to 1.42.
Michael
--
Michael Peppler Data Migrations, Inc.
[EMAIL PROTECTED] http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html