Skip to Content.
Sympa Menu

freetds - Re: Can not execute two sentences into the same transaction!

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Pier Paolo Bortone" <pierpaolo.bortone AT netengineering.it>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Can not execute two sentences into the same transaction!
  • Date: Thu, 1 Feb 2001 13:05:45 +0100

Do you know about Transaction Isolation Level?
 
If you browse the javadoc under java.sql.Connection, you can find about Transaction levels.
 
Ask at your connection what is the transaction level with connection.getTransactionIsolation().
 
 o TRANSACTION_NONE
Transactions are not supported.
 o TRANSACTION_READ_COMMITTED
Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
 o TRANSACTION_READ_UNCOMMITTED
Dirty reads, non-repeatable reads and phantom reads can occur.
 o TRANSACTION_REPEATABLE_READ
Dirty reads and non-repeatable reads are prevented; phantom reads can occur.
 o TRANSACTION_SERIALIZABLE
Dirty reads, non-repeatable reads and phantom reads are prevented.
 
Pier Paolo.
 
----- Original Message -----
From: Jordi
Sent: Thursday, February 01, 2001 12:36 PM
Subject: [freetds] Can not execute two sentences into the same transaction!

Hi all,

I'm using Freetds JDBC Driver.

First, i execute setAutocommit(false).
After, i execute an UPDATE sentece and SELECT to see results table.
The process hangs at the SELECT statement.
If i use setAutocommit(true) or Commit after Update sentence, the
process works!!. I don't want to commit results if i'm not sure of them,
this is the reason to run UPDATE and SELECT into the same transaction.

Why?.

Thank a lot.


---
You are currently subscribed to freetds as: [pierpaolo.bortone AT netengineering.it]
To unsubscribe, forward this message to leave-freetds-121965M AT franklin.oit.unc.edu



Archive powered by MHonArc 2.6.24.

Top of Page