Skip to Content.
Sympa Menu

freetds - [freetds] Transactions errors with DBD-Sybase-1.05

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "David Barnwell" <david.barnwell AT well.ox.ac.uk>
  • To: <sybperl-l AT peppler.org>
  • Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Transactions errors with DBD-Sybase-1.05
  • Date: Tue, 22 Mar 2005 19:04:03 -0000

Hi,

I've hit some problems executing transactions and rollbacks with
DBD-Sybase-1.05 and FreeTDS 0.63RC10. My client system runs Red Hat
Enterprise Linux 3 and perl-5.8.0-88.4, and the server is SQL Server 2000.

The code I use is based on the example in DBI.pm. The central part is:

$dbh->{AutoCommit} = 0;
$dbh->{RaiseError} = 1;

eval {
my $sth = $dbh->prepare($sql);
$sth->execute;
$sth->finish;
$dbh->commit;
};
if ($@) {
eval { $dbh->rollback };
}

The SQL statement executes a stored procedure that updates a table. This
works fine with DBD-Sybase-1.04 and FreeTDS 0.63RC10. The procedure is
executed OK and the table is updated.

However, the program fails with DBD-Sybase-1.05. The SQL is executed and
the table is updated, but the transaction fails with the following error
message:

Attempt to initiate a new SQL Server operation with results pending

The program then attempts to execute the rollback. The rollback fails
silently, leaving the table updated.

I've put copies of the perl code, the program output and the TDS dumps (both
versions) on http://well.ox.ac.uk/~barnwell/

Any ideas?

Thanks,
David Barnwell

Database Developer/Systems Administrator
Wellcome Trust Centre for Human Genetics
University of Oxford, Roosevelt Drive, Oxford OX3 7BN, UK





Archive powered by MHonArc 2.6.24.

Top of Page