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
jbuilder15
Dear,
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
commit)
Please kindly give some advice!
Thanks!
 
 

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
dataset..
Use the method changesPending to check,if there any changes in the
dataset to save or cancel.
Hope it helps
Olaf Raether
On Thu, 8 Apr 2004 10:28:47 +0800, "Angus" < XXXX@XXXXX.COM >wrote:
Quote
Dear,
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
commit)

Please kindly give some advice!
Thanks!