A: 

Where is your sqlite3_finalize() ??

You should release sqlite3_stmt structure in your sqlite3_prepare_v2 block, as following.

sqlite3_stmt *sql_stmt; 
if (sqlite3_prepare_v2(...) == SQLITE_OK)
{
    ....

    sqlite3_finalize(sql_stmt);
}
Toro
Thank you Toro for your reply
new_programmer
+1  A: 

Try enabled breakpoints on exceptions and run your app in the debugger. It will show you exactly where you are calling objectAtIndex:. (It is not in the above code)

St3fan
Thank you St3fan, I did as you told. I found the reason for exception.
new_programmer