On 15 Jul 2014, at 6:58pm, Mayank Kumar (mayankum) <mayan...@cisco.com> wrote:
> I was calling it after sqlite3_open,I will try calling before sqlite3_open > and update the thread. When you call sqlite3_config() after sqlite3_open() it returns SQLITE_MISUSE to tell you you're doing it wrong. The fact that you didn't notice this error shows us you are not checking the result codes returned by (almost ?) all sqlite3 API calls. Checking these results codes for /every/ call helps programmers spot and correct almost all errors. It's important to check them all because often the error is returned by a different call to the one which, logically, should be generating the error. It's simple, you just replace <mysqlitecallhere> with something like if (<mysqlitecallhere> != SQLITE_OK) { <report error and quit> } When people report problems to this list, having them make this change to /every/ sqlite3 call makes a lot of them go away. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users