<P>DBI trace information can be enabled for all handles using this DBI
class method. To enable trace information for a specific handle use
the similar $h->trace method described elsewhere.</P>
<P><STRONG>Trace Levels:</STRONG></P>
<PRE>
0 - trace disabled.
1 - trace DBI method calls returning with results.
2 - trace method entry with parameters and exit with results.
3 - as above, adding some high-level information from the driver
also adds some internal information from the DBI.
4 - as above, adding more detailed information from the driver
also includes DBI mutex information when using threaded perl.
5 and above - as above but with more and more obscure information.</PRE>
<P>Trace level 1 is best for a simple overview of what's happening.
Trace level 2 is a good choice for general purpose tracing. Levels 3
and above (up to 9) are best reserved for use when investigating a
specific problem and you need to see 'inside' the driver and DBI.</P>
<P>The trace output is detailed and typically <EM>very</EM> useful. Much of the
trace output is formatted using the <A HREF="#neat">neat</A> function and thus strings
in the trace output may be edited and truncated by it.</P>
<P>Initially trace output is written to STDERR. If $trace_filename is
specified then the file is opened in append mode and <EM>all</EM> trace
output (including that from other handles) is redirected to that file.
Further calls to trace without a $trace_filename do not alter where
the trace output is sent. If $trace_filename is undefined then
trace output is sent to STDERR and the previous trace file closed.</P>
<P>See also the $h-><A HREF="#item_trace"><CODE>trace()</CODE></A> and $h-><A HREF="#item_trace_msg"><CODE>trace_msg()</CODE></A> methodd and <A HREF="#debugging">DEBUGGING</A>
for information about the DBI_TRACE environment variable.</P>
<P>See also the <A HREF="#trace">trace</A> method.</P>
<P>
<HR>
<H1><A NAME="warning and error messages">WARNING AND ERROR MESSAGES</A></H1>
<P>(This section needs more words about causes and remedies.)</P>
<P>
<H2><A NAME="fatal errors">Fatal Errors</A></H2>
<DL>
<DT><STRONG><A NAME="item_Can%27t_call_method_%22prepare%22_without_a_packag">Can't call method ``prepare'' without a package or object reference</A></STRONG><BR>
<DD>
The $dbh handle you're using to call prepare is probably undefined because
the preceeding connect failed. You should always check the return status of
DBI methods, or use the <A HREF="#raiseerror">RaiseError</A> attribute.
<P></P>
<DT><STRONG><A NAME="item_Can%27t_call_method_%22execute%22_without_a_packag">Can't call method ``execute'' without a package or object reference</A></STRONG><BR>
<DD>
The $sth handle you're using to call execute is probably undefined because
the preceeding prepare failed. You should always check the return status of
DBI methods, or use the <A HREF="#raiseerror">RaiseError</A> attribute.
<P></P>
<DT><STRONG><A NAME="item_DBI%2FDBD_internal_version_mismatch">DBI/DBD internal version mismatch</A></STRONG><BR>
<DD>
<DT><STRONG><A NAME="item_DBD_driver_has_not_implemented_the_AutoCommit_attr">DBD driver has not implemented the AutoCommit attribute</A></STRONG><BR>
<H1><A NAME="other related work and perl modules">OTHER RELATED WORK AND PERL MODULES</A></H1>
<DL>
<DT><STRONG><A NAME="item_Apache%3A%3ADBI_by_E%2EMergl%40bawue%2Ede">Apache::DBI by <A HREF="mailto:E.Mergl@bawue.de">E.Mergl@bawue.de</A></A></STRONG><BR>
<DD>
To be used with the Apache daemon together with an embedded perl
interpreter like mod_perl. Establishes a database connection which
remains open for the lifetime of the http daemon. This way the CGI
connect and disconnect for every database access becomes superfluous.
<P></P>
<DT><STRONG><A NAME="item_JDBC_Server_by_Stuart_%27Zen%27_Bishop_%3Czen%40bf">JDBC Server by Stuart 'Zen' Bishop <<A HREF="mailto:zen@bf.rmit.edu.au">zen@bf.rmit.edu.au</A>></A></STRONG><BR>
<DD>
The server is written in Perl. The client classes that talk to it are
of course in Java. Thus, a Java applet or application will be able to
comunicate via the JDBC API with any database that has a DBI driver installed.
The URL used is in the form jdbc:dbi://host.domain.etc:999/Driver/DBName.
It seems to be very similar to some commercial products, such as jdbcKona.