I want to set the AutoCommit property  when opening my database 
connection on a SQL server 7 on the same W2000 box.
I'm using ActiveState Perl 5.6.1.

I've tried the following:

        my $dbh = DBI->connect('DBI:ADO:absolut','sa','',{ AutoCommit => 0 })
          or die "Couldn't connect to database : " . DBI->errstr;

which give me the error:

Can't disable AutoCommit at C:/Perl/site/lib/DBI.pm line 433

Did anyone know how to resolv that problem ?

Then I also have trouble to use placeholders (?) in sql statement. Here is my 
code:
        $sth = $dbh->prepare("select * from Category  where CategoryId=?");
        $sth->execute('1');

and the error:

DBD::ADO::st execute failed: Can't execute statement 'select * from Category  
where CategoryId=?': -2147217904: OLE exception from "Microsoft OLE DB 
Provider for ODBC Drivers":

[Microsoft][ODBC SQL Server Driver]Champ COUNT incorrect

Win32::OLE(0.1502) error 0x80040e10
    in METHOD/PROPERTYGET "Execute"
-2147217904:  at tmp.pl line 11.


Thanks

Reply via email to