Board index » jbuilder » How to check if the stansaction is commited or not?
How to check if the stansaction is commited or not?
2004-04-08 10:28:47 AM
I got a question about use of class of Database.
I find methods such as, commit(), rollback(), setAutocommit(),..etc
However, how can I determinate if a transaction if commit or not?
May be my basic concept is not yet clear, what I am doing not is:
set a database connection->create a dataset->make changes in dataset->use
saveChange(DataSet)->and then what???(how to make sure transaction is
Please kindly give some advice!
2004-04-08 07:57:27 PM
Re:How to check if the stansaction is commited or not?
I donīt think that itīs possible to check if a transaction is
committed or not, because every database has a diffent behaviour.
The older versions of MySql has no transaction.
Oracle has always a transaction running, implicit after
every commit or rollback.
With other database, you have to start a transaction explicit.
What you can do in JB is to check if there are any changes in the
Use the method changesPending to check,if there any changes in the
dataset to save or cancel.
Hope it helps
On Thu, 8 Apr 2004 10:28:47 +0800, "Angus" < XXXX@XXXXX.COM >wrote: