Board index » delphi » No user transaction is in progress

No user transaction is in progress

    I have the following problem: I am using a component TDataBase that
controls all transactions. First I did  : "DataBAse1.StartTransaction"
and then
"DataBAse1.commit"  (or Rollback) ,
but when Delphi try to execute " DataBAse1.commit" , Delphi gives me a
message like this:

"No user transaction is currently in progress. The commit has no
corresponding Begin Transaction."

The property InTransaction is true and he message above tells the
oposite.
What shoud I do? Is it a  delphi bug??
Please, someone help me!!!

 

Re:No user transaction is in progress


Hi Luciana,

  I encountered this before. What I did to fix the problem was to
always test whether the database is in transaction before calling commit,
i.e. something like: if database1.inTransaction then database1.commit.
Hope this helps :-)

On Wed, 23 Dec 1998, Luciana de Landa Farias wrote:

Quote
>     I have the following problem: I am using a component TDataBase that
> controls all transactions. First I did  : "DataBAse1.StartTransaction"
> and then
> "DataBAse1.commit"  (or Rollback) ,
> but when Delphi try to execute " DataBAse1.commit" , Delphi gives me a
> message like this:

> "No user transaction is currently in progress. The commit has no
> corresponding Begin Transaction."

> The property InTransaction is true and he message above tells the
> oposite.
> What shoud I do? Is it a  delphi bug??
> Please, someone help me!!!

Other Threads