jeudi 30 juillet 2015

How to get the specific error code from sqlite3_exec?

So, I need to try to lock a sqlite database and update a table. To do this, I started it off with pragma locking_mode=exclusive; begin exclusive;. As expected though, when another program has a lock on the database this fails. It returns the generic SQLITE_ERROR code. However, I'd prefer to have the exact reason, SQLITE_LOCKED. How can I determine what the more specific error from sqlite3_exec() is?

Aucun commentaire:

Enregistrer un commentaire