in reply to Locking a DB

What DB are you using? Most serious databases will automatically put locks on data pages so that only one connection can update a page.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me

Replies are listed 'Best First'.
Re: Locking a DB
by Anonymous Monk on Sep 06, 2001 at 09:27 UTC
    If your DB doesn't have locking capability, use a locking module. When you need to update a db; create a new one. Lock the new db. When the new db is finished writing to the disk, unlock it and replace the old db with the new db. That way, the old db is safe while the update is being made to the new db.
    I hope that helps,
     ERIC