----- Original Message -----
From: "Matt Sergeant" <[EMAIL PROTECTED]>
To: "KAWAI,Takanori" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2002 5:18 PM
Subject: Re: DBD::SQLite


> On Tue, 19 Feb 2002, KAWAI,Takanori wrote:
>
> > ----- Original Message -----
> > From: "Matt Sergeant" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 19, 2002 4:29 AM
> > Subject: DBD::SQLite
> >
(snip)
> > But have these functions not implemented?
> > - Place holders
> > - Transaction support with $dbh->commit(), $dbh->rollback()
>
> OK, both fixed and uploaded as 0.02:
>
> http://axkit.org/download/DBD-SQLite-0.02.tar.gz
>
> Let me know how you get on.
Thank you for your fast fix.
It works almost fine.
But unfortunately, it makes a error when I call execute twice on the
same statement handle.

[sample]
use strict;
use DBI;
unlink "foo";
my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "",
  {AutoCommit => 0, RaiseError => 1});
$dbh->do("CREATE TABLE MST (id, lbl)");
$dbh->do("CREATE TABLE TRN (no, id, qty)");
my $sth = $dbh->prepare('INSERT INTO MST VALUES(?, ?)');
$sth->trace(9);
$sth->execute(2, 'ITEM2'); #works fine
$sth->execute(3, 'ITEM3'); #makes some trouble(?)
$dbh->rollback;
$dbh->disconnect;

[Result]
[kawait@lins t]$ perl -w t1.pl
    DBI::st=HASH(0x8181ad4) trace level set to 9 in DBI 1.20-nothread
    -> execute for DBD::SQLite::st (DBI::st=HASH(0x811df44)~0x8181ad4 2
'ITEM2')
    <- execute= '0E0' at t1.pl line 10
    -> execute for DBD::SQLite::st (DBI::st=HASH(0x811df44)~0x8181ad4 3
'ITEM3')
Modification of a read-only value attempted at t1.pl line 11.
    -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x8181ad4)~INNER)
    <- DESTROY= undef
Issuing rollback() for database handle being DESTROY'd without explicit
disconne
ct().
Attempt to free unreferenced scalar.

==============================================
Kawai, Takanori(Hippo2000)
   Mail: [EMAIL PROTECTED] [EMAIL PROTECTED]
   http://member.nifty.ne.jp/hippo2000
==============================================

Reply via email to