This code works fine on the iPhone and the iPhone simulator, but crashes the simulator when running on the iPad:
const char *createsql = [MYClass GetDBCreationString];
sqlite3_stmt *crts;
if (sqlite3_prepare_v2(database, createsql, -1, &crts, NULL) == SQLITE_OK) {
int success = sqlite3_step(crts);
if (success != SQLITE_DONE) {
///problem
}
sqlite3_finalize(crts);
sqlite3_reset(crts);
}
It's code to create the SQLLite table that will hold that specific class. It crashes on the reset line every time, but it does successfully create the table.
On the iPhone and iPhone simulator it works fine. Is the finalize and reset being redundant? If so, why does it crash on iPad but work fine on iPhone?