LinqConnect Professional Version 4.2.229 (18-Apr-2013) - How insert into SQLite from two process?
Posted: Thu 06 Jun 2013 15:50
Hello,
I have any new problem.
I need insert data into SQLite from several process (two and more application).
And i get error:
In the search for solutions, I found the following opportunity.Use modes Serialized (must be specified flag SQLITE_OPEN_FULLMUTEX) or Multi-thread (SQLITE_OPEN_NOMUTEX).
In the documentation of the Devart found this:
Link 1 Link 2 Link 3
But how to use it?
For example the problem that my test project: SQLiteStressTest.rar (833.2 КБ)
1) Run two instances of the application.
2) In the first instance click "Generate" as long as there is a process, click "Generate" and in the second instance.
3) We get an error about the blocking.
PS: I have license for dotConnect Universal Professional and LinqConnect Professional (both installed).
My developer license number is CRUni-00787 and CRSqlED-00467.
I have any new problem.
I need insert data into SQLite from several process (two and more application).
And i get error:
Code: Select all
Devart.Data.SQLite.SQLiteException (0x00000005): The database file is locked
database is locked
в Devart.Data.SQLite.ad.h()
в Devart.Data.SQLite.ad.b()
в Devart.Common.f.c(DbConnectionBase A_0)
в Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
в Devart.Common.DbConnectionBase.Open()
в Devart.Data.SQLite.SQLiteConnection.Open()
в SQLiteStressTest.fMain.LoggingInsert(DateTime logDateTime, String logMessage, String logSource, String logData, String logType, String logUserName) в d:\Repository\test\SQLiteStressTest\SQLiteStressTest\FormMain.cs:строка 136
в SQLiteStressTest.fMain.GenerateData(Int32 iCount, ProgressBar progressBar, Control label) в d:\Repository\test\SQLiteStressTest\SQLiteStressTest\FormMain.cs:строка 194
в SQLiteStressTest.fMain.bGenerateTwo_Click(Object sender, EventArgs e) в d:\Repository\test\SQLiteStressTest\SQLiteStressTest\FormMain.cs:строка 61
в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ButtonBase.WndProc(Message& m)
в System.Windows.Forms.Button.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
In the documentation of the Devart found this:
Code: Select all
Devart.Data.SQLite Namespace> SQLiteConnectionOpenFlags Class: SQLITE_OPEN_FULLMUTEX Field
...
[C #]public static int SQLITE_OPEN_FULLMUTEX
...
But how to use it?
For example the problem that my test project: SQLiteStressTest.rar (833.2 КБ)
1) Run two instances of the application.
2) In the first instance click "Generate" as long as there is a process, click "Generate" and in the second instance.
3) We get an error about the blocking.
PS: I have license for dotConnect Universal Professional and LinqConnect Professional (both installed).
My developer license number is CRUni-00787 and CRSqlED-00467.