[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.


Anne,

I'm reading between the lines somewhat since I'm not sure I followed your question.

I think you are saying you have an active select statement (i.e. a reader) in progress and then you are trying to do a delete to remove the current record. The delete would need to write to the database table.

SQLite can support multiple simultaneous readers, or a single writer, but not a mixture of active readers and a writer. When a reader is active it holds a shared lock on the database. When a writer starts, it tries to get an exclusive lock on the database. If there are any active readers the writer can't get the exclusive lock.

You must close the reader (i.e. finalize or reset the select statement) before the delete can be done.

HTH
Dennis Cote

Reply via email to