I currently have an iPhone app in the iTunes app store that uses a SQLite database as a datastore. The user can sync the app against a web service and data that is returned
sqlite3 *database; sqlite3_stmt *update_statement = nil;
if(sqlite3_open([strDatabasePath UTF8String], &database) == SQLITE_OK)
{
nsstring *strMQueryupdate="write your query here";
const char *sql = [strMQueryupdate UTF8String];
if (sqlite3_prepare_v2(database, sql, -1, &update_statement, NULL) != SQLITE_OK) {
NSLog(@"update fails");
}
else
{
sqlite3_bind_text(update_statement, 1, [[arrayname objectAtIndex:0] UTF8String], -1, SQLITE_TRANSIENT);
int success = sqlite3_step(update_statement);
sqlite3_reset(update_statement);
if (success == SQLITE_ERROR){}
else {}
}
sqlite3_finalize(update_statement);
}
sqlite3_close(database);