sqlite database opens fine on the iPhone simulator, but not on the device

Posted by Kimberly on Stack Overflow See other posts from Stack Overflow or by Kimberly
Published on 2010-05-04T01:00:35Z Indexed on 2010/05/04 1:08 UTC
Read the original article Hit count: 436

Why would this run fine on the iPhone simulator... but the database can't be opened on an iPhone device?

sqlite3 *g_Db = nil;

BOOL OpenDatabase(NSString *databaseName)
{
    if(sqlite3_open([databaseName UTF8String], &g_Db) == SQLITE_OK)
    {
        NSLog(@"Opened db ok");
        return(YES);
    }
    else
    {
        NSLog(@"Can't open the db");
        sqlite3_close(g_Db);
        g_Db = nil;
        return(NO);
    }
}

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about iphone-simulator