DBD::Sybase::db do failed: Server message number=2762

From: James Anderson (Jim.Anderson_at_morganstanley.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 09:10:10 -0500
To: <dbi-users@perl.org>

I googled and found a reference to this, but the link was dead :-( There
no longer appears to be anything in the mail archive.
 
DBD::Sybase::db do failed: Server message number=2762 severity=16
state=3 line=1 server=NYTIBA8 text=The 'CREATE TABLE' command is not
allowed within a multi-statement transaction in the ...
 
The code is trivial:
 
------------------------------------------------------------------------
------------------------------------
#!/usr/local/bin/perl5.6
 
use strict;
use warnings;
 
use DBI;
 
my %create = ( test1 => <<EOD,
create table test1 (
  user_id numeric(10,0) identity,
  last_name varchar(30) not null,
  first_name varchar(30) not null
)
EOD
);
 
my %drop = ( test1 => 1 );
 
my $dbh = DBI->connect( "dbi:Sybase:server=MY_SERVER",
                        "user", "password",
                        { RaiseError => 1, AutoCommit => 0 } );
$dbh->do("use my_database");
 
for (keys %create) {
    print "-------------------\n$create{$_}-------------------\n";
    $dbh->do( $create{$_} );
    $dbh->commit;
    print "created table $_\n";
}
 
$dbh->disconnect;
------------------------------------------------------------------------
------------------------------------
 
Any help appreciated,
 
jim
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
 



Relevant Pages

  • Re: Garbage collector bug
    ... > analogy of subscribing a mailing list, in perfectly working world, yes I ... > need to inform list server that I'm dead or I have moved so it can remove me ... > I've lost the reference. ... it *is* accessible - by the delegate. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: DE/Sega in loving memory messages?
    ...  Are they all dead ... because while playing moden Sterns they seem to have stopped putting ... The one I recognize right off the top is Jay Ward. ... So the reference here ...
    (rec.games.pinball)
  • Re: Torchwood Continuity (spoilers)
    ... AFAIK Children of Earth hasn't made any reference to Planet of the Dead, ... opportunity to get the timeline back on track. ...
    (rec.arts.drwho)
  • Re: A question for Mike Monett.....
    ... Jim Thompson wrote: ... simulator website but the link to the paper is dead. ... you able to make this reference available? ...
    (sci.electronics.design)
  • Re: A question for Mike Monett.....
    ... Winfield Hill wrote: ... simulator website but the link to the paper is dead. ... you able to make this reference available? ...
    (sci.electronics.design)