in reply to DBI: seeing what's actually executed

It does show the whole "pieced together" statement upon ->execute ... what trace level are you using? what version of DBI?

Update: I see the complete statement using DBD::Pg and trace(2) .. but i don't see it w/this test snippet:
use strict; use warnings; use DBI; my $dbh = DBI->connect("DBI:CSV:f_dir=/tmp"); $dbh->trace(2); $dbh->do("CREATE TABLE a (id INTEGER, name CHAR(10))"); $dbh->do("INSERT INTO a (id, name) values (?,?)", {}, 1, 'one'); $dbh->selectall_arrayref("select * from a where id < ?",{},2); my $sth = $dbh->prepare("select * from a where id < ?"); $sth->execute(2); use Data::Dumper; warn Dumper $sth->fetchall_arrayref();

Replies are listed 'Best First'.
Re^2: DBI: seeing what's actually executed
by thor (Priest) on Sep 29, 2005 at 15:38 UTC
    I tried every trace level up to 5. I'm using DBI v1.43 with ODBC v1.10. I'm trying to execute a SELECT statement. When I view the trace log, I see the word SELECT in there either once or twice (depending on the trace level). If the statements were assembled, I'd see it a couple hundred times.

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      Try setting odbc_exec_direct.