I've released a newer version of DBD::ADO to CPAN today.  Install it
and  try the code again.  We've had some mix up with version numbers,
so I'm not sure what version you're using.

The error message is from DBI (the driver DBD::ADO) stating it can
not change the AutoCommit mode.  I believe this was the case with an
earlier of DBD::ADO.

My apology for the mix up.
Tom

On Fri, May 25, 2001 at 03:22:42PM -0400, Garrison G. Lutz wrote:
> 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";

-- 
Thomas A. Lowery
See DBI/FAQ http://tlowery.hypermart.net

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to