Database compaction using sqlceengine.Compact throws exception

Hi All,

I want to compact my database which is big in size arround 6MB.

While compacting it sqlceengine throws an exception.

Could not load database compaction library. Operation has been aborted.

Below is my code snippet.

lobjsqlceEngine = new SqlCeEngine("Data Source = " + pstrDBPath+";LCID=1033");
                lstrTempDBPath = "Path2"
                                if (lobjsqlceEngine.Verify())
                {
                    lobjsqlceEngine.Compact("Data Source = " + lstrTempDBPath + Path.DirectorySeparatorChar + pstrSDFName + ";LCID=1033");
                }
lobjsqlceEngine.Dispose();

It runs fine for first .sdf file but for second it throws error.

Anybody know why this problem is occuring??

Thanks

July 4th, 2013 5:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics