Hello everyone,

I have built sqlite myself (using VC 6.0),

I am using the sqlite_step interface for iterating a tables
rows.

I am having a bit of a hard time understanding something:

When I am in the middle of stepping (sqlite_step) through the
results of a table query, the database is locked.  Is this normal?  Have
I missed something?

I open two connections:
pConn1 = sqlite_open(m_sDbPath.c_str(),0,NULL);
pConn2 = sqlite_open(m_sDbPath.c_str(),0,NULL);

I do the query and compile a query on conn1, then
start stepping through the rows of results.

If I try to do any execs using pConn2 - I always get
an error code saying the database is locked.

If I finalize the query (on conn1) then execs work.
I have THREADING=1 defined when I compile (just for your info).

So I am confused.  Lets say I wanted to do this (psuedocode):

pConn1 = sqlite_open(m_sDbPath.c_str(),0,NULL);
pConn2 = sqlite_open(m_sDbPath.c_str(),0,NULL);

(create & compile query selecting ROWID,* from my_table for conn1)
sqlite_step(m_pVM, &numCols, &results, &cols)

.. look at at stuff

..find a piece of data that needs updated.
sqlite_exec(pConn2,sqlupdatestatement,NULL,NULL,NULL);//<--Always returns a
lock

..continue stepping..

Thanks for any help,

David



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to