I'm using Windows 7, opening an sqlite file in my documents folder with VS2010 and the amalgamation of sqlite (the header and the .c file compiled right in).
I'm using the following code to open the database:
SQLiteDatabase *pDB = new SQLiteDatabase(m_strFileName, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0); This is a good simple wrapper (Kompex) for sqlite. I've seen this error various times and it seems to be intermittent - I can't pinpoint what causes it.
I don't see why the file is not writeable - it's in my documents folder. No other process has it open... Here are the details:
I have about 5 "CREATE TABLE IF NOT EXISTS" happening and executing fine. The 6th one is a new one I am adding to an existing sqlite database file. Does SQLite not like it when you try to add tables to an existing database file?