On 17 Jan 2012, at 6:47am, Solanki, Ajay (GE Energy) wrote:

> I  have a question on how to enable PENDING LOCK before issuing an
> INSERT statement from the C# code.

What do you want SQLite to do instead of a pending lock ?

If you want to disable the locking entirely, you can do it with PRAGMAs.  Start 
by looking at "PRAGMA synchronous".  (Note: this will lead to corruption of 
your database if you try to do any multi-access with it.)

If you want to do an immediate lock instead of a pending lock then surround 
your operations with

BEGIN IMMEDIATE TRANSACTION;
INSERT ...
... other operations ...
END TRANSACTION;

This is is a perfectly normal way of doing things in SQLite and will not lead 
to corruption.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to