问题描述
当我尝试在SQLite数据库上运行更新查询时,我收到此错误。这只发生在XP上(在Vista上运行正常)。创建数据库没有任何问题,插入也工作正常。
我也检查了,我有权限和磁盘空间可用(因为sqlite.org说这些是可能的原因)。
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).
推荐答案
对我有用的一个答案是使用语句将journal_mode值设置为删除以外的东西。您可以通过发出PRAGMA语句(例如 PRAGMA journal_mode = OFF
)来执行此操作,方法与发出查询语句的方式相同。我用c#发布了一个例子:
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/
编辑
可能更好的PRAGMA声明是 PRAGMA journal_mode = TRUNCATE
而不是OFF 正如其他几个人所建议的那样。
Probably a better PRAGMA statement to issue is PRAGMA journal_mode = TRUNCATE
rather than "OFF" as a couple of the others have suggested.
这篇关于异常消息:发生某种磁盘I / O错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!