Works inSimulator 6.1, but not on iPhone iOS 6.1
<p>I am using the iPhone 6.1 Simulator and it works.  However, when I go to my iPhone [iOS 6.1] I get an error "Error while updating. not an error". HELP!!!!</p>

<pre><code>    NSString *filePath = [[[NSBundle mainBundle] resourcePath ]stringByAppendingPathComponent:@"myDatabase.sqlite"];


    NSString* str2 = SeqNo1.text;
    sqlite3 *database;
    sqlite3_stmt *updateStmt=NULL;
    if(sqlite3_open([filePath UTF8String], &amp;database) == SQLITE_OK)
    {
        NSString* sql= [NSString stringWithFormat:@"UPDATE MyTable Set MyField2 = \"%@\" WHERE MyField1 = \"%@\"", @"Y", str2];
        if(sqlite3_prepare(db, [sql cStringUsingEncoding:NSASCIIStringEncoding], -1, &amp;updateStmt, NULL) != SQLITE_OK)
            NSLog(@"Error while creating update statement. %s", sqlite3_errmsg(database));
    }
    if(sqlite3_open([filePath UTF8String], &amp;database) == SQLITE_OK)        
    {
    int step = sqlite3_step(updateStmt);
    if(step != SQLITE_DONE)

        NSLog(@"Error while updating. %s", sqlite3_errmsg(database));  // THIS WHERE THE ERROR IS OCCURRING
    sqlite3_finalize(updateStmt);
    sqlite3_close(database);
    }
    else{
        NSLog(@"Error while Opening Databse. %s", sqlite3_errmsg(database));
    }
</code></pre>
