RE: dbi transactions error handling

2010-09-20 Thread Ian Harisay
I think you would be better off to write it like this. $dbh->{RaiseError} = 0; $dbh->{PrintError} = 0; $dbh->{AutoCommit} = 0; my @record = ($row_id, $file_id, $offset, $country, $date_day, $campaign, $leaf_id, $status_id); my $rv; SWITCH: { last unless($rv = $sql_live->execute(@record)); l

Re: DBI->data_sources("Pg") problem

2010-09-20 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > However, this piece of code gives nothing: > my @dbs=DBI->data_sources("Pg)"; Works fine for me (once the quoting problem is fixed). What version of DBI and DBD::Pg do you have? Does it work if you connect to a Postgres database first, and

dbi transactions error handling

2010-09-20 Thread Paolo Lunazzi
Hi all, I'm working on a script that should manage transactions. My code is something like this: --- CODE --- $dbh->{RaiseError} = 1; $dbh->{PrintError} = 0; $dbh->{AutoCommit} = 0; eval { $sql_live->execute( $row_id, $file_id, $offset, $country, $date_day,

DBI->data_sources("Pg") problem

2010-09-20 Thread Laslo Forro
Hi there, I am trying to get the databases from a running PostgreSQL database. However, this piece of code gives nothing: my @dbs=DBI->data_sources("Pg)"; I tried to trace the situation and ended up here in DBI module: DBD::Pg::dr::data_sources(/home/salmonix/perl5/lib/perl5/x86_64-linux-thread-mu

RE: DBD::OCBC support for XML datatype in SQL Server 2005

2010-09-20 Thread Ludwig, Michael
> Thanks to Perl Monks for identifying the length() problem and to > Tim for pointing me at other areas where it could be a problem. And thanks to you, Martin! Michael