Re: CompactDatabase made DB grow in size



Rob,

Wow. Do you get the same result if you compact the database to a new file, then delete the original file and rename the new one back?

--

Ginny Caughey
Device Application Development MVP


"Rob C" <RobC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C8C1E3B6-D3F9-47FB-A4B5-883870BA0DD8@xxxxxxxxxxxxxxxx
I added a call in my C#.net program to do a CompactDatabase on the handheld
device. When I tested it, it turned my 2.5MB database into an 11.1MB
database. Below is my code:

string connString = "Data Source = 'myDB.sdf'; Password = 'PWD'; Encrypt =
TRUE;"
SqlCeEngine engine = new SqlCeEngine(connString);
engine.Compact(null);
engine.Dispose();

Anybody have any ideas what might be happening here?

Regards,

Rob C

.



Relevant Pages