Subject | Re: Transaction question |
---|---|
Author | barroxfer |
Post date | 2003-06-13T17:02:08Z |
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy" <rrokytskyy@a.
..> wrote:
application I have 2 different threads importing data into firebird.
It will run over a slow network and I don't want one thread commiting
other's thread work. I found this message but doesn't work with
firebird:
Ben Starr wrote:
SQL
the DBMS supports, such as for Sybase You can do:
stmt.executeUpdate("BEGIN TRAN myTran");
stmt.executeUpdate("SAVE TRANSACTION");
etc.
Joe Weinstein at BEA, the home of WebLogic
Regards, Fernando.
..> wrote:
> Hi,transaction
>
> > I'm trying to create a transaction with this code:
> >
> > try
> > {
> > conex.getConnection().setAutoCommit(false);
> > conex.getConnection().createStatement().execute("set
> > name tr1 read committed");I've always used the commit method from connection, but in my
> > ...
> > Can anybody guide me on how to begin-commit a transaction.
>
> Try to read JDBC tutorial. Transactions in JDBC are started
> automatically before the first statement is executed. Transaction do
> not have names and there can be only one transaction per connection.
> Transaction isolation level is set using
> Connection.setTransactionIsolation(int) method.
application I have 2 different threads importing data into firebird.
It will run over a slow network and I don't want one thread commiting
other's thread work. I found this message but doesn't work with
firebird:
Ben Starr wrote:
> Does JDBC support nested transactions?Hi Ben, No it doesn't.
> From what I have seen there is noprevious
> explicit statement to start a transaction, they just start from the
> commit or rollback. I may be missing something but this seems tomake
> implementing nested transactions impossible.More difficult, but not impossible. You can always revert to whatever
SQL
the DBMS supports, such as for Sybase You can do:
stmt.executeUpdate("BEGIN TRAN myTran");
stmt.executeUpdate("SAVE TRANSACTION");
etc.
Joe Weinstein at BEA, the home of WebLogic
Regards, Fernando.