On 9/7/07, Yves Goergen <[EMAIL PROTECTED]> wrote:

> I'm currently using a transaction for this on the database side and
> rolling it back if the file cannot be deleted. But what if the file is
> gone and then SQLite says it doesn't accept my records? Since we're
> inside a transaction, integrity checks should be deferred until a
> COMMIT. Is there a way to tell whether the COMMIT will succeed under the
> current conditions so that I can safely delete the file?

What integrity checks?

You could also take the approach of maintaining a "delete journal"
inside the database itself, but controlled by the application.  E.g.
write a record to a table that says you're deleting file foo as part
of the transaction, and when the COMMIT succeeds, your application can
delete the file.  If something happens between the commit and delete,
your application can consult the journal to find out what file was
supposed to be deleted, and pick up where it left off.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to