Russell Leighton <[EMAIL PROTECTED]> wrote:
> So, this was very enlightening...I have a simple backup function that I 
> now question is correct.
> 
> It does:
>     - execute "begin" // lock from writes
>     -copy db file to new file byte by byte
>     - execute "commit" // unlock
> 
> ....I was thinking that "begin" would lock the file.
> 

Use BEGIN EXCLUSIVE instead of just BEGIN.  The extra
"EXCLUSIVE" keyword causes it to acquire a lock right
away.
--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to