Basically, after the tutorial on SQLite Ray Wenderlich , I am writing a fairly simple application that displays information dumped from the server. The basic structure of my SQLite queries (to the local database, not to the server) is as follows:
{ NSMutableArray *list = [[NSMutableArray alloc] init]; NSString *query = @"SELECT _id, type FROM table ORDER BY type";
My question is: what is the best way to check for an error if the if returns false? The simplest solution for me seems to keep the return value of sqlite3_prepare_v2() as int and check that against SQLITE_OK . What about calling sqlite_errmsg() ?
I looked through sqlite_exec() , but I was out of luck with overlays, and I donβt feel confident enough in my understanding of C callbacks to properly support code that uses them. He passes the argument for the error, although this made me look into it first.
ele
source share