Mike Ashmore <[EMAIL PROTECTED]> wrote: > Hello all, > I'm working on a system in which I'm using SQLite to open a number of > database files and to perform operations on aggregate views of those > files. > > The problem I've got is, some of the files I want SQLite to open and > SELECT from, I can only acquire read access to. And the operating > system I'm using doesn't allow me to place any sort of advisory lock > on a file that I've only got read access to (it considers placing an > advisory lock to be a write operation) (@#%!# high security operating > systems). >
If the file truely is read-only (that is to say, if you know no other process is going to be changing it out from under you) then you can just do this: PRAGMA omit_readlock=ON; With this option enabled, SQLite will not bother to use a read-lock on readonly files. If I recall, though, the file really does need to be readonly for this to work. So "chmod 444" the file first. -- D. Richard Hipp <[EMAIL PROTECTED]>