freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Curt Hagenlocher" <curt AT hagenlocher.org>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: transactions and freetds
- Date: Sun, 22 Apr 2001 19:45:57 -0700
> we are evaluating the free tds jdbc driver. As we have jdk 3.0
> we tried the snapshot version freetdsjdbcsnapshot.jar2_0 and
> we have problem with transactions against MS SQL server..
> We tried command connection.setAutoCommit(false) and after
> first update command it hangs. Does the driver supports
> transactions or do we something wrong?
Even if this didn't hang, it's probably not going to do what
you expect. Connection.commit() in FreeTDS just loops over
all of the individual statements associated with the connection
and calls commit() on each of them. You could still end up
with one of the statements committing and the other one rolling
back. This is because each statement ends up with a separate
database pid servicing it.
So what you probably want is to create the first statement,
execute whatever, destroy the statement, create the second
statement and execute it. But because of FreeTDS's tendency
to create a new database pid at the drop of a hat, this too
may not work. Test with SQL Profiler running to find out.
--
Curt Hagenlocher
curt AT hagenlocher.org
-
transactions and freetds,
Martin Fibiger, 04/22/2001
- <Possible follow-up(s)>
- Re: transactions and freetds, Curt Hagenlocher, 04/22/2001
Archive powered by MHonArc 2.6.24.