tags:

views:

6

answers:

0

This looks like a memory or caching problem, but I don't know how to really debug how it's happing.

I'm using Objective-C in X-code for this program. This is how I'm opening the database:

-(BOOL) open {
    if (sqlite3_open_v2([[documentDirectory stringByAppendingPathComponent:[surveyName stringByAppendingPathExtensions:@"sqlite"]] UTF8String], &database, SQLITE_OPEN_READWRITE, NULL) != SQLITE_OK) {
        NSLog(@"Database open failed!");
        return NO;
    }
    return YES;
}

This happens randomly, but always happens after about 200 writes to the database (which is about 8.1 megs right now). I have full permission to be writing to where the sqlite3 database is. This might be a small problem, so if someone else can let me know if there's a simple answer? I'll add more information if need be. Thanks!