freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Rajeev" <rajeev.k AT recruitlive.com.au>
- To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
- Subject: Thanks!!!!!!!!!!!
- Date: Wed, 11 Jul 2001 14:41:33 +1000
Kevin,
Thanks a lot for your suggestion .It works fine . I opened the source code
for Statement.java and commented the block where they are using rollback()
inside the close() of statement . At the moment it works .Well I have to
test in all other angles
Thanks a lot
cheers
Rajeev
-----Original Message-----
From: bounce-freetds-132882 AT franklin.oit.unc.edu
[mailto:bounce-freetds-132882 AT franklin.oit.unc.edu]On Behalf Of Kevin
Fries
Sent: Wednesday, July 11, 2001 2:33 AM
To: TDS Development Group
Subject: [freetds] Re: Free TDS/JDBC Driver problem .Help
Rajeev,
Regarding commit/rollback with the driver, I noticed the same problem. It
turns out to be an interesting choice the author(s) made regarding when to
terminate a transaction. I've never seen this behavior on any other
driver (oracle/mysql/allaire/merant/Inetd) but...
Check out the source code to Statement.java You'll see that it will issue
a rollback call upon close of the statement. This means you have to
explicitly call commit() using the same statement you performed your work
on in order to keep the changes. That's pretty odd, IMHO.
Locally, I've re-coded the source to issue the explicit rollback only upon
close of the Connection. My version still loops through each Statement in
the connection, rolling back each. But when Connection.commit() is
called, my version rolls through each Statement and commits it. I think
this is much closer to the behavior of other JDBC drivers.
I'm still having some odd locking issues, and struggling with issuing a
PreparedStatement.setString() on anything longer than 2k (actually, 2015
bytes) but changing this commit behavior improved things for me quite a
bit.
Related to the commit, I wanted to ask this of the JDBC crew. Has anyone
compared issuing the "set implicit_transactions on" call to issuing a
specific "BEGIN TRAN" call? I don't know if this works with sybase, but
this is the way other commercial drivers work, so I wonder if some locking
issues I have might go away if I recoded it this way? Just curious.
hth,
Kevin Fries
kelfink AT yahoo.com
---
You are currently subscribed to freetds as: [rajeev.k AT recruitlive.com.au]
To unsubscribe, forward this message to
$subst('Email.Unsub')
- Thanks!!!!!!!!!!!, Rajeev, 07/11/2001
Archive powered by MHonArc 2.6.24.