Thanks for the clarification.
The error I am receiving must then be produced by the application rather than just reporting an SQLite error.
Or
The application is taking control of the commit wait time, allowing my script to continue.
Or more correct perhaps; the script commands are passed to the application which allows the script to continue producing the DETACH error.
*****
There was a problem querying the database:
Error executing SQL statement "DETACH ExportDB " : SQL logic error or missing database (1,1) Cancel, Retry, Ignore
****
The error is ambiguous at best but I believe the second scenario is what is happening given the consistent time before clicking "Retry" is accepted without error.
I have posted the information received so far to the developers however, I'm not expecting the application to be corrected/changed in a hurry as ATTACH/DETACH are unusual events in user scripts.
So the question remains:
Is there a way to check for open transactions / locks from the command line?
-----Original Message-----
From:
sqlite-users-bounces@sqlite.org [mailto:
sqlite-users-bounces@sqlite.org] On Behalf Of Dennis Cote
Sent: Tuesday, 27 May 2008 11:23 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Checking for open transactions attach/detach database
MoDementia wrote:
> The database file is ready to (copy) Detach as soon as the commit completes.
>
Yes.
> This is the problem.
> Detach: "This statement will fail if SQLite is in the middle of a
> transaction."
This is true. This is why you must commit your transaction before you can detach.
> If I commit 10k row updates I cannot detach the database until it is
> finished.
>
The database (SQLite) will be finished all its processing by the time it returns to your program after executing the commit statement.
Attach
Begin
Loop to insert many rows
Commit
Detach
> I need to be able to check some sort of table entry that will be clear
> once the commit is finished.
The commit is finished when it returns to your program.