RE: Can't turn off autocommit

"Wechsler, Steven" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <E67053DABCCDF4428BB7974550E1108F01DC218D@DIRECTEFFECT.mtvn.ad.viacom.com>
Thanks. Guess the DBI documentation on CPAN is wrong, then, since I copied
and pasted it from there.
 
Steve

  _____  

From: Peng, Ge [mailto:[email protected]] 
Sent: Tuesday, May 10, 2005 3:03 PM
To: Wechsler, Steven; [email protected]
Subject: RE: Can't turn off autocommit



It should be $dbh->{AutoCommit} = 0;

Your $dbh is an object and usually a Perl object is a blessed reference to a
hash.

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Wechsler, Steven
Sent: Tuesday, May 10, 2005 1:50 PM
To: '[email protected]'
Subject: Can't turn off autocommit

 

OK, this is more a DBI than a Sybperl question, but anyway, here's my code: 

$dbh = DBI->connect("dbi:Sybase:server=$server", $login, $password, 
                    {PrintError => 1, AutoCommit => 1}); 
if (! $dbh) { 
    die "Can't connect to $server: $DBI::errstr\n"; 
} 

# do some stuff 
. 
. 
. 
$dbh->(AutoCommit) = 0; 

When the script hits that autocommit line, I get the message 
"Not a subroutine reference at myscript.pl line 175." 

Any ideas? 

Thanks, 

Steve 

----------------------------------------------------------------------------
---------------------
-------------------------

CONFIDENTIALITY AND SECURITY NOTICE

This e-mail contains information that may be confidential and 
proprietary. It is to be read and used solely by the intended recipient(s). 
Citadel and its affiliates retain all proprietary rights they may have in
the 
information. If you are not an intended recipient, please notify us 
immediately either by reply e-mail or by telephone at 312-395-2100 
and delete this e-mail (including any attachments hereto) immediately 
without reading, disseminating, distributing or copying. We cannot give 
any assurances that this e-mail and any attachments are free of viruses 
and other harmful code. Citadel reserves the right to monitor, intercept 
and block all communications involving its computer systems.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.