Hi guys
I have a question, I can't get my sqlite database to work/open on an ipad device. Everything works fine on the simulator but not a real device. I put MODE to NO when i want to test on a device but it fails to load.
sqlite3 *database;
if (MODE) { //Simulator
result = sqlite3_open("/Users/userID/Myapp/VRdb.sqlite", &database);
} else { // On device
result = sqlite3_open([databasePath UTF8String], &database);
}
if(result != SQLITE_OK)
{
sqlite3_close(database);
view = [[UIAlertView alloc]
initWithTitle: @"Database Error"
message: @"Failed to open database."
delegate: self
cancelButtonTitle: @"OK" otherButtonTitles: nil];
[view show];
[view autorelease];
}
databasePath is obtained by :
databasePath = [[NSBundle mainBundle] pathForResource:@"VRdb" ofType:@"sqlite"];
Is there something that I missed?????