I attempt to delete a number of rows from a table in a SQL Server CE 3.5 database and I get a SqlCeException
:
An internal error occurred. [ ID = 3649 ]
I've read that it means that the database is in a corrupted state and must be repaired although there is little information about the specific error.
I use the SqlCeEngine.Verify()
and it returns true
. According to MSDN
Returns True if the checksums match and there is no database corruption; otherwise, false.
I also use the SqlCeEngine.Repair(null, RepairOption.RecoverCorruptedRows)
;
and then attempt to delete the rows again and the command is executed without any errors and rows are deleted.
I'm confused is it or not the db corrupted? I think it is (but the verify returns true). If it is corrupted how it became corrupted? I create a new connection for every database access and I don't share the same SqlCeConnection
objects between threads (or any other SQL Server CE related objects) The database is deployed on a mobile device.