#!c:\perl\bin\perl.exe -w use strict; use DBI qw':sql_types'; my $DSN = '********'; my $USER = '********'; my $PASSWORD = '********'; # Connect to database my $dbh = DBI->connect("dbi:ODBC:$DSN", $USER, $PASSWORD, {RaiseError => 1}) or die "Couldn't connect to database: " . DBI->errstr; # 0 - Trace disabled. # 1 - Trace DBI method calls returning with results or errors. # 2 - Trace method entry with parameters and returning with results. # 3 - As above, adding some high-level information from the driver # and 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. DBI->trace(2, "trace.txt"); #### $sth->bind_param($bind_col, $variable, SQL_LONGVARCHAR);