Search code examples
sqlitewindows-xpio

Exception Message: Some kind of disk I/O error occurred


I am getting this error when I try to run a update query on a SQLite database. This only happens on XP (on Vista works fine). The database is created without any issue, insert also works fine. I also checked and I have permissions and disk space available (as sqlite.org says these are possible causes).


Solution

  • One answer that has worked for me is to use the PRAGMA statement to set the journal_mode value to something other than "DELETE". You do this by issuing a PRAGMA statement such as PRAGMA journal_mode = OFF in the same way you would issue a query statement. I posted an example of this using c# at: http://www.stevemcarthur.co.uk/blog/post/some-kind-of-disk-io-error-occurred-sqlite/

    Edit

    Probably a better PRAGMA statement to issue is PRAGMA journal_mode = TRUNCATE rather than "OFF" as a couple of the others have suggested.