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: testing if a JFrame has been disposed.
    ... also no longer referenced in the program is as good as dead, and finally dead when the GC remove the object. ... as long as you keep your ppframe reference to the frame the frame is is not dead. ... Just disposing the frame doesn't cut it. ... Set that reference to null after you disposed the frame. ...
    (comp.lang.java.gui)
  • Re: What is this convection cell nonsense
    ... deviation fropm the dead center of the Earth rather than using ... I would easily explain how stupid it is to reference the deviation ... from the 'dead center' but you lot seem intent in continuing to make ... The reference point of a physical model is arbitrary, ...
    (sci.geo.geology)
  • Re: What is this convection cell nonsense
    ... deviation fropm the dead center of the Earth rather than using ... I would easily explain how stupid it is to reference the deviation ... from the 'dead center' but you lot seem intent in continuing to make ...
    (sci.geo.geology)