Skip to Content.
Sympa Menu

freetds - More questions about JDBC and transactions and multiple Statements

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Betty Chang" <bettyc AT aimnet.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: More questions about JDBC and transactions and multiple Statements
  • Date: Fri, 3 Mar 2000 08:03:12 -0800

Hello all again --
 
Within one transaction, I can use one Statement and update a table row and read back data from that row fine.
 
However, if I use a PreparedStatement for the update and selection,. I cannot call a new prepareStatement for the selection because the row will be locked.  It does work if I use the PreparedStatement as a Statement and just call executeQuery(qstr) on it.  That is because it is considered the same Statement, correct?
 
However, if transactions need to be done under one Statement, why is it that I can use two different Statements to update two different tables and things do commit and rollback just fine?  
 
Betty
 
 
 


  • More questions about JDBC and transactions and multiple Statements, Betty Chang, 03/03/2000

Archive powered by MHonArc 2.6.24.

Top of Page