My C#/SQLite app works fine but outputs this error once in a while:SQLite error (10): delayed 25ms for lock/sharing conflict根据此线程上的建议,我已更新为最新的SQLite,但仍然会发生.该如何解决?As suggested on this thread, I updated to the latest SQLite, but it still happens.How to fix this? SQLite版本:sqlite-netFx40-static-binary-Win32-2010-1.0.84.0.zip在 http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wikiSQLite version: sqlite-netFx40-static-binary-Win32-2010-1.0.84.0.zip at the Precompiled Statically-Linked Binaries for 32-bit Windows (.NET Framework 4.0) paragraph at http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki Visual C#2010 ExpressVisual C# 2010 Express推荐答案此原始代码中的 using (var command = new SQLiteCommand(GetSQLiteConnection())) { try { command.CommandText = "DELETE FROM folders WHERE path='" + path + "'"; command.ExecuteNonQuery(); } catch (SQLiteException e) { SparkleLogger.LogInfo("CmisDatabase", e.Message); } }更改为此即可解决问题(仅前两行有所不同):Changing to this solved the problem (only the first two lines differ): var connection = GetSQLiteConnection(); using (var command = new SQLiteCommand(connection)) { try { command.CommandText = "DELETE FROM folders WHERE path='" + path + "'"; command.ExecuteNonQuery(); } catch (SQLiteException e) { SparkleLogger.LogInfo("CmisDatabase", e.Message); } } 这篇关于SQLite错误(10):因锁定/共享冲突而延迟25ms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-04 17:10
查看更多