Editing the database while program running

Started by Jay911, February 17, 2010, 11:28:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jay911

Hi all,

I want to do some serious cleanup of the database on my installation. I don't want to use a wiped-out blank database, and I don't want to use Database Explorer because I'm not very fond of its user interface. So I want to edit the database externally, either by editing the file that's in use by the program while it's running, or a second copy which I'll then copy back in to the program's data directory. Can this be done while the program is running?

Thanks in advance!
--j.

bearcat

I prefer to do it on a copy and then replace the original when ANRB is closed down. BUT I keep the original so I have a good version if any thing goes wrong.

DaveReid

From The Definitive Guide to SQLite:

SQLite has coarse-grained locking, which allows multiple readers but only one writer at a time.  Writers exclusively lock the database during writes and no one else has access during that time.  SQLite does take steps to minimize the amount of time in which exclusive locks are held.  Generally, locks in SQLite are kept for only a few milliseconds.  But as a general rule of thumb, if your application has high write concurrency (many connections competing to write to the same database) and it is time critical, you probably need another database.  It is really a matter of testing your application to know what kind of performance you can get.

HTH
Dave
This post has been scanned for any traces of negativity, bias, sarcasm and general anti-social behaviour