Cannot Commit

I am rewriting a previous program and am getting an error in a Messagebox “Cannot Commit - No Transaction is Active”

This only appears to be happening on a Delete Record, BUT when you check the data in the Database the data HAS been deleted.

If you switched from RealSqlDatabase to SQLiteDatabase, one of the things that changed is that we no longer automatically start a transaction for you, so if you have a call to Commit, youll get this error without a matching Begin Transaction.

Thanks Greg, what do I need to do to correct this.
This is my current code

app.karter.SQLExecute("delete from mydriver where PK = "+ str(mydriverpk)) app.karter.Commit

Worked it out thanks, read the Doc’s :slight_smile:

Remove the commit.

app.karter.SQLExecute "delete from mydriver where PK = " + Str(mydriverpk)

When you have multiple SQLExecute methods that should be grouped as one transaction, start with a begin and finish with a commit.

app.karter.SQLExecute "begin" . . . app.karter.SQLExecute "delete from mydriver where PK = " + Str(mydriverpk) . . . app.karter.Commit

Thanks Frederick