Hello all,
When using DBD-ADO to connect to MS SQL Server in the "DSN-less" way my program does
not reach the end (printing out "Done!"), nor does it die with an error. It simply
says:
Can't disable AutoCommit at C:/Perl/site/lib/DBI.pm line 433
Any reasons for this? Configuration and program reproduced below. Thanks!
ActivePerl Build 626
Windows 2000 Server
MS SQL Server 2000
DBD-ADO version 1.17
DBI version 1.14
#!/usr/local/bin/perl
use DBI;
my ($database_connection) = "";
my ($dsn) = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=username;Initial
Catalog=DBtable;Data Source=(local)";
$database_connection = DBI->connect(
"dbi:ADO:$dsn", "username", "password",
{
PrintError => 0,
RaiseError => 1,
AutoCommit => 0,
LongReadLen => 100000
}
) or die "ERROR: $DBI::errstr\n";
eval {
$database_connection->commit;
$database_connection->disconnect;
};
if ($@) {
$database_connection->rollback;
$database_connection->disconnect;
die "ERROR: $@\n";
}
print "Done!\n";