After seeing the recent posting by Greg Sabino Mullane in subject "Log
DBI query and values with placeholders" I realised there was something
else DBD::ODBC was out of date with - tracing.
DBD::ODBC does not implement its own trace flags but neither does it
react to 'SQL' tracing. If I set trace('SQL') I can see the TraceLevel
is set to 256 and I can find:
sub parse_trace_flag {
my ($h, $name) = @_;
# 0xddDDDDrL (driver, DBI, reserved, Level)
return 0x00000100 if $name eq 'SQL';
return;
}
in DBI. So to test if 'SQL' is enabled we:
if *DBIc_TRACE_LEVEL(imp_xxh) & 256) {blah;}
Is that correct? No constant I am missing?
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com