Board index » delphi » tried to commit or rollback a transaction without first beginning a transaction"

tried to commit or rollback a transaction without first beginning a transaction"

this is my source code:
try
 mydatabase.start transaction
.
.
.
.
if mydatabase.intransaction then
mydatabase.Commit
except
if mydatabase.intransaction then
mydatabase.rollback
end;

this code work fine the first time i execute, but fal at others times.

someone can help me?

thanks
felipe jimenez

 

Re:tried to commit or rollback a transaction without first beginning a transaction"


Generally telling us which database and which version of Delphi might be
helpful. The exact text of the error message is also helpful.

The syntax of your examples doesn't seem to be ADO, the subject of this
newsgroup.

Kevin

Quote
"felipe" <felipejime...@tricom.net> wrote in message

news:3eefac85@newsgroups.borland.com...
Quote
> this is my source code:
> try
>  mydatabase.start transaction
> .
> .
> .
> .
> if mydatabase.intransaction then
> mydatabase.Commit
> except
> if mydatabase.intransaction then
> mydatabase.rollback
> end;

> this code work fine the first time i execute, but fal at others times.

> someone can help me?

> thanks
> felipe jimenez

Other Threads