An Sqlite database is a single file, and it needs to be locked whenever
it is being altered. That means that only one process/thread can access
the database at any one time. If you open it twice you get no benefit.
You have to design your application such that multiple users have some
way of synchronizing access (serializing). In certain cases you may
have to create a temporary table, possibly in another database, to avoid
deadlocking. I find that using a mutex to synchronize thread access
within a process works efficiently. For multiple co-operating processes
you could use a semaphore or similar or build lock detection into your
application using the Sqlite API if you cannot be sure that the user
processes will co-operate..
JS
[EMAIL PROTECTED] wrote:
Hi to all
...meet another problem... ;-)
Is it possible to open more than one active Recordset connect
to a single-opened Database? This means, that I want to open
the Database one times in a initial Function of the App. And
then followed, i want to open more as one Recordset connected to
this openend Database at the same time (...to read and write and
manipulate the Data-Tables and after work close the Recordsets).
The actual problem is, first I opened my Database, then open a
Table-Recordset to fill in a View. Then I Execute a "Delete from...."
to the Database used by the primary Database-Connection, but create
a new/another (temporary) sqlite3_stmt *pExecRecordset to perform
it. I think, that the primary Recordset is not Dynamic,
also it don't know this Delete. Okay, thats not the problem.
It doesn't work. How is the error? If I perform the Delete
separately without a "concurrent" Recordset it works well.
Have I open allways a Database-Connection for each Recordset?
I think, that cannot be. In a Dialog-App a User performs permanet
changes to the fieldvalues of the present recordset and sends
permanent a SQL-Update to the DB.
Many Thanks for help and Greetings
Anne