No problem when I try each routine seperately.
But simulraneous insertion and retrieval to/from one db by two thread in linux
result in the message "database is locked".
I need how to access recent data although it is being used by inserttion
operation.
Is there any idea to solve this?
I insert like followings :
rc = sqlite3_prepare(m_pDB, szSQL, -1, &pStmt, 0);
sqlite3_bind_int64(pStmt, 1, m_pTBDataDBData->lTime);
.
.
rc = sqlite3_step(pStmt);
rc = sqlite3_finalize(pStmt);
I retrieve like followings :
rc = sqlite3_prepare(m_pDB, szSQL, -1, &m_pStmtPlayback, 0);
sqlite3_bind_int64(m_pStmtPlayback, 1, m_pTBDataDBData->lTime);
.
.
rc = sqlite3_step(m_pStmtPlayback);
if( rc==SQLITE_ROW ){
m_pTBDataDBData->lTime = sqlite3_column_int64(m_pStmtPlayback, 0);
...
}
c = sqlite3_finalize(m_pStmtPlayback);
...