vcoderv has asked for the wisdom of the Perl Monks concerning the following question:
#!/efs/dist/perl5/core/5.10/exec/bin/perl use EFSPerl::Version 'DBI' => '1.607', 'DBD-Sybase' => '1.09'; use 5.010; use DBI qw(:sql_types); my %attr = ( 'RaiseError' => 1, 'PrintError' => 0, 'ChopBlanks' => 1, 'AutoCommit' => 0, ); print "establishingh connection\n"; my $dbh = DBI->connect("dbi:Sybase:server=ETMA_NYDEV_DS;database=some_ +db","some_uid","some_pwd", \%attr); print "preparing call to PerlTest sp\n"; my $sth = $dbh->prepare("exec PerlTest2 \@RetVal = ? OUTPUT, \@SomePar +am = ? "); print "starting transaction\n"; $dbh -> begin_work; # <<<<< error here .... DBD::Sybase::db begin_w +ork failed: Already in a transaction $sth->bind_param(1, undef, SQL_INTEGER); $sth->bind_param(2, "val1", SQL_VARCHAR); print "executing...\n"; $sth->execute; print "rolling back...\n"; # lets rollback $dbh->rollback; print "finishing...\n"; $sth -> finish; $dbh->disconnect; close dbh; print "----disconnected------\n"; exit 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD Sybase Transaction begin_work fails
by kennethk (Abbot) on Sep 15, 2009 at 16:02 UTC | |
by ikegami (Patriarch) on Sep 15, 2009 at 16:48 UTC | |
by vcoderv (Initiate) on Sep 15, 2009 at 16:59 UTC | |
|
Re: DBD Sybase Transaction begin_work fails
by mje (Curate) on Sep 15, 2009 at 16:24 UTC | |
by vcoderv (Initiate) on Sep 15, 2009 at 16:55 UTC | |
|
Re: DBD Sybase Transaction begin_work fails
by vcoderv (Initiate) on Sep 15, 2009 at 17:48 UTC |