我有一个SQL Server CE数据库正在使用最大数据库大小4096kB。当我插入一行我得到的,符合市场预期,出现以下错误:Catch-22当SQL Server CE数据库已满并试图删除
The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [ Required Max Database Size (in MB; 0 if unknown) = 4092 ]
所以,我想通过只删除某些行,发出一个普通SqlCeCommand
来处理这个问题。问题在于,即使通过ExecuteNonQuery
执行的删除命令现在也会在它已满时引发此错误。
我该如何解决这个问题?
我曾尝试与SqlCeEngine缩小它确实也收缩的百分比或两个,但仍运行查询时出现同样的问题。 – serializer 2014-12-05 08:20:15