mardi 4 août 2015

How to debug binding parameters in SQLite3?

In the other question I learned how to properly bind parameters to prepared SQL statements. However, I found out that sqlite3_step() returns with SQLITE_DONE if I don't bind all parameters. I would rather consider this to be an error. Furthermore, I do not know if this is the source of error in my code, hence my questions aim at understanding how to debug the behavior of SQLite during the binding process:

  1. How can I determine which parameters are not set?
  2. Can I somehow see the statement with bound parameters inserted, for debugging purposes?
  3. Why does SQLite not respond with SQLITE_NOT_ALL_PARAMETERS_SET or SQLITE_ERROR if not all parameters are set?

Aucun commentaire:

Enregistrer un commentaire