Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i'm having a problem with Sql Server compact reporting the error : -

"OS Error: SQL Server Compact encountered a premature EOF for the database file. Running the repair utility might help recover some data."

I develop with Visual Studio 2005 with .NET CF 3.5 in CE 6.0

This error is random and i'm going crazy.

Can i help me???


Thanks
Posted

1 solution

Something is corrupting your database: I have never seen that error and I've been using those DBs for a while. Check that you have enough space for the file - are you running out of memory / file system space, and masking the exception when you insert or update? Try changing the file name: is something else corrupting the file?

It's not possible to be specific about a problem like this, but those are the basics I would start with.
 
Share this answer
 
Comments
militico 12-Jul-11 6:45am    
This error corrupt the db but if i copy the db in another machine, the file is intact...

i've the exception when i insert but i've this problem few time...
OriginalGriff 12-Jul-11 7:35am    
Check the free space wherever you are saving the SDF file - you may not have enough spare.
militico 12-Jul-11 11:15am    
but i recopy same file in same root the file is intact. i think it's not enought space...but it is possible run out of memory...
Sergey Alexandrovich Kryukov 12-Jul-11 12:07pm    
Most certainly a corruption. EOF? In database? Corruption. My 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900