[Mono-dev] Mono.Data.Sqlite
Anders Aagaard
aagaande at gmail.com
Sun Jun 29 06:16:36 EDT 2008
Hi
I've been using Mono.Data.Sqlite in a multi threaded application, since the
code says it's based on Robert Simpson's library I've been looking at his
page for documentation (as Mono.Data.Sqlite documentation seems extremely
sparse).
My problem is that when using multiple threads, all writing to the database,
I get :
Unhandled Exception: Mono.Data.Sqlite.SqliteException: The database file is
locked
Every thread has it's own cloned SqliteConnection (during the creation of
the thread I call MasterConnection.Clone (), and only use the referenced
connection). The exception happens instantly when two threads begin a
transaction to the same database.
Is the instructions for Robert Simpson's library not accurate for mono's
sqlite library, or am I hitting a bug? Any suggestions on how to cleanly
work around this problem?
I have one file scanner that adds files to the database, one text file
scanner that scans all text files added and adds web links from them, and
one web updater that takes the links and updates that from an online
database. They are all seperate threads. The main thread will also
occasionally do a small commit, but it will mostly read from the database.
--
View this message in context: http://www.nabble.com/Mono.Data.Sqlite-tp18179121p18179121.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list