Board index » delphi » A User Transaction Is Already In Progress

A User Transaction Is Already In Progress

'A User Transaction Is Already In Progress'

When updating,  this error messages occurs before I ApplyUpdates
    Database1.StartTransaction

 I'm not sure where to look.

Paul.

 

Re:A User Transaction Is Already In Progress


Quote
Paul LeBlanc wrote:
> 'A User Transaction Is Already In Progress'

> When updating,  this error messages occurs before I ApplyUpdates
>     Database1.StartTransaction

>  I'm not sure where to look.

> Paul.

You propably started a transaction without doing Commit() or Rollback(),
or
an exception occured between StartTransaction() and Commit() and in the
except-block was no transactionhandling like Commit() or Rollback().

I would say, it's the best to check if a transaction is running, before
starting a new
one (i dont't know the execpt command: InTransaction,
IsTransactionstarted, or something like this).

hope i could help you

    Markus

Re:A User Transaction Is Already In Progress


Thanks Markus,

    I'll check it out.

Markus Munteanu <Markus.Munte...@Systema.co.at> wrote in article
<379815BC.4F4CB...@Systema.co.at>...

Quote
> Paul LeBlanc wrote:

> > 'A User Transaction Is Already In Progress'

> > When updating,  this error messages occurs before I ApplyUpdates
> >     Database1.StartTransaction

> >  I'm not sure where to look.

> > Paul.

> You propably started a transaction without doing Commit() or Rollback(),
> or
> an exception occured between StartTransaction() and Commit() and in the
> except-block was no transactionhandling like Commit() or Rollback().

> I would say, it's the best to check if a transaction is running, before
> starting a new
> one (i dont't know the execpt command: InTransaction,
> IsTransactionstarted, or something like this).

> hope i could help you

>     Markus

Re:A User Transaction Is Already In Progress


when using StartTransaction there is no a need to use cacheupdate.
so remove the applyupdate, commitupdate and cancel update.
and use following method (it should be work);

when start transaciton use following syntax;

If not Database1.InTransaction then
   Database1.StartTransaction;

when commit use following syntax;
if Database1.InTransaction then
   Database1.Commit;

Quote
Paul LeBlanc wrote in message

<01bed4d3$e40e8f60$10000...@mur.odyssey.on.ca>...
Quote

>'A User Transaction Is Already In Progress'

>When updating,  this error messages occurs before I ApplyUpdates
>    Database1.StartTransaction

> I'm not sure where to look.

>Paul.

Other Threads