in reply to Problem with SQLite connection

This error comes when the .db file does not exist or is not in the format of SQLite. You can try with empty file and re-created table(s). Otherwise your code works without errors for me.