Skip to content Skip to sidebar Skip to footer

Sqlce Flush Interval - Will The Default Setting Lead To Corruption?

SqlCE has a parameter set on the Connect String called Flush Interval. It is defined as: The interval time (in seconds) before all committed transactions are flushed to disk. If n

Solution 1:

With newer versions, the Commit operation is overloaded. If you call Commit with a CommitMode.Immediate parameter, the Flush-Interval setting is ignored, and changes are persisted to the file immediately. The default option is CommitMode.Deferred (in the parameter-less call) which is based on the Flush-Interval value.

Refer to my post on SQLCE Corruptions: resolving corruption in SQL Server Compact Edition database files

Solution 2:

With older versions there were indeed corruption problems. Worst case scenario with the more recent versions is missing data.

You cannot set the parameter to zero, though. 1 is the minimum.

Post a Comment for "Sqlce Flush Interval - Will The Default Setting Lead To Corruption?"