views:

184

answers:

1

Hi there!

While developing for iphone i get “EXC_BAD_ACCESS” when doing

    sqlite3         *memory_db;
    if (sqlite3_open(":memory:", &memory_db) != SQLITE_OK)
    {
        sqlite3_close(memory_db);
        NSAssert(0, @"Failed to open in-memory database");
}

also doing

    NSString * memory_db_filename = @":memory:";
    if (sqlite3_open([memory_db_filename UTF8String], &memory_db) != SQLITE_OK)
    {
        sqlite3_close(memory_db);
        NSAssert(0, @"Failed to open in-memory database");
    }

does not help. Are in-memory sqlite3 databases not available on the iphone?

Any comments are appreciated!

+1  A: 

EXC_BAD_ACCESS is not an SQLite3 error code. See this SO question.

Doug Currie
Indeed. Sorry, the error came from some lines further in the code, and i didn't realize it. Many thanks!
sdnf189uwebf18ubwe8fbas