Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: DBI: seeing what's actually executed

by davidrw (Prior)
on Sep 29, 2005 at 15:32 UTC ( #496146=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496146]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2020-11-30 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?