1

I am using sqlite database, one sqlite database file accessed from 2 process simultaneously so it throws error:

"Database is locked".

I used Lock(){ /*sqlite addition*/ } for all insert or update operations. Is there any way to find out is sqlite DB file is being used in another process or is it open in another process?

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
Pratik
  • 267
  • 4
  • 16
  • possible duplicate of [SQLite3 and multiple processes](http://stackoverflow.com/questions/1063438/sqlite3-and-multiple-processes) – Alex Filipovici Jul 02 '13 at 07:39
  • i read the link which you gave but while using it in c# .net. My code is like Open Connection, // insert or update query // Executenonquery() at this moment it throws exception. so i want to check it here only how can i check with existing connection. because that code is generic so connection object is different for different call. so i want to check it there only – Pratik Jul 02 '13 at 13:05
  • Hey could you please tell me solution for this i am stuck on it from last one week. I want to access same database file in 2 process concurrently. how should I lock that database file in different process. – Pratik Jul 04 '13 at 09:51
  • I want to do it in c#.net and sqlite.netdll – Pratik Jul 04 '13 at 09:59
  • Have you tried this suggestion: http://stackoverflow.com/a/17592858/95008 Or alternatively this: http://www.techcoil.com/blog/my-experience-with-system-data-sqlite-in-c/ – Spiralis Jan 31 '14 at 17:25

0 Answers0