Hi,

I have some trouble with the new SQL::Statement 1.14 when using a DBI:CSV
database and bind values.

Please have a look at these few lines:

~~~
#!/usr/bin/perl -w
use strict;
use DBI;

my $dbh=DBI->connect("DBI:CSV:f_dir=./db",'','',
        { RaiseError => 1, AutoCommit => 1 })
        or die 'Could not connect to database!';

$dbh->do('drop table if exists test');
$dbh->do('create table test (col1 text, col2 text)');

$dbh->do('insert into test (col1, col2) values(\'a\', \'b\')');
$dbh->do('insert into test (col1, col2) values(\'c\', \'d\')');
$dbh->do('insert into test (col1, col2) values(\'e\', \'f\')');

my $sql='update test set col1 = ? where col1 = ?';

$dbh->do($sql,undef,'X','a');
$dbh->do($sql,undef,'X','c');
$dbh->do($sql,undef,'X','e');

$dbh->disconnect;
~~~

Executing this and having a look a the database (./test.pl && cat db/test),
I get the following output:

col1,col2
X,b
c,d
e,f

, whereas I expected

col1,col2
X,b
X,d
X,f

, which indeed will be produced when using SQL::Statement 1.09
(sorry, this was the version I had before).

Does anybody have an idea what has happened?

Thanks in advance
Steffen

Reply via email to