[yunqa.de] Re: Error "SQLite Error 1 - cannot rollback - no transaction is active".

  • From: Edwin Yip <edwin.yip@xxxxxxxxxxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Fri, 28 Jan 2011 18:52:22 +0800

Hi Ralf,

Thank you for your help. I also don't know how to reproduce it... I'll try
and will keep an eye on it to see any specific info I can gather.

On Fri, Jan 28, 2011 at 6:42 PM, Delphi Inspiration <delphi@xxxxxxxx> wrote:

> On 27.01.2011 16:28, Edwin Yip wrote:
>
> > But my problem is with the *original *database file, not a one that's
> > copied to another computer by Dropbox.
> >
> > Maybe this "SQLite Error 1 - cannot rollback - no transaction is active"
> > error is not related to Dropbox? Since I got the same error report from
> > some of my software users. What other factors might cause this problem?
> >
> > And the code that caused this error is as following:
> >   if FDb.InTransaction then
> >     FDb.Commit; //yes, commit, not rollback, I wonder why the errr msg
> > says 'rollback'.
>
> I tried to reproduce, but could not. Can you send some code that
> demonstrates your problem?
>
> Please know that
>
>  TDISQLite3Database.InTransaction
>
> only works if used in pair with
>
>  TDISQLite3Database.StartTransaction;
>  TDISQLite3Database.Commit;
>  TDISQLite3Database.Rollback;
>
> This group of four maintains its own counter to mimic nested
> transactions, which are not supported by SQLite. They do not work with
> SQL transaction commands like BEGIN, COMMIT, or ROLLBACK.
>
> Therefore applications must never mix SQL transaction commands with
> TDISQLite3Database transaction methods. Is this something you are doing?
>
> I can not think of how this would generate the error message you are
> seeing, but since I have no other clues it might be worth checking.
>
> Ralf
> _______________________________________________
> Delphi Inspiration mailing list
> yunqa@xxxxxxxxxxxxx
> //www.freelists.org/list/yunqa
>
>
>
>


-- 
Best Regards,
Edwin Yip

Mind Mapping is as Effortless as Typing
http://www.InnovationGear.com

Other related posts: