The problem you could be having is that your prepared statement is invalid after sqlite3_close. You need to create a new prepared statement each time you open the database.
- Open the database with
sqlite3_open. - Prepare the statement with
sqlite3_prepareand friends. - Bind with
sqlite3_bind. - Step with
sqlite3_step. - Afterwards, ensure you call
sqlite3_finalize. - Close the database with
sqlite3_close.
You can't just reset the statement, because that statement was prepared for a different database handle.
NB
I'm not too familiar with SQLite.
dreamlax
2009-12-22 03:14:38