Thank you, Gerry.
So basically, it seems, ROLLBACK, COMMIT or END would all do nicely in this
particular context. Hopefully I'll never need to worry about locking etc
because I have no intention of changing the data in the database and <so
far> I've successfully managed to extract what I want from the live database
using a SELECT statement with only the occasional "busy" message. However,
the prospect of what amounts to an automatic daily back-up and then working
on the backup is much more comfortable.
I think I'm going to have to find some excuse for closing the data-provider
down (next time Windows Update insists I have to re-boot, probably), make a
quick backup copy of the inactive database in the normal way, turn the
data-provider back on again and run an experimental program on the new live
database. If it doesn't work, switch off again, quickly restore the backup,
get going again and <grin> come back to you kind folk. All in the wee small
hours when the data-flow is at its lowest.
Just for interest, this is what it's all about:
http://www.kinetic-avionics.co.uk/sbs-1.php
The software that processes the data from this clever piece of kit uses
Sqlite3, but it has to be said that it's missing some vital features, one of
them being the ability to produce a report of what happened between time A
and time B. It will produce a backup but this takes an age and is done by
exporting each table in the database as a separate .csv file - and last time
I tried it on a live database the reporting application just went into "not
responding" mode. So we have to do it ourselves.
Thanks again
Michael Hooker
http://www.AvPhotosOnline.org.uk
----- Original Message -----
From: "Gerry Snyder" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Tuesday, June 19, 2007 7:51 PM
Subject: Re: [sqlite] Proper way to transfer a live sqlite database
Michael Hooker wrote:
Many thanks for the explanation Dan.
Ditto the thanks.
I suspected the purpose of ROLLBACK was as you say, but couldn't see why
it was used here. You point out the "under the hood" difference between
ROLLBACK and COMMIT, but what about END? My main (third-party,
commercial) application may well have some data stored waiting to be fed
into the database after the file has been copied, and if it is forced to
discard its cache that presumably means these are lost, which wouldn't be
a good idea.
It shouldn't have to. The cache Dan was referring to was an internal copy
of (part of) what is already in the data base. If the data base file has
been updated, that copy has to be discarded, since it may not be valid--of
course, it may be valid, but figuring out whether it is would be a lot
more work than just rereading it. Anyhow, this is all happening at a much
lower level than the application data you are referring to, which is still
valid and should be entered into the file.
HTH,
Gerry
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------