SQL Server Compact 4 Invalid Provider
-
Monday, November 26, 2012 11:25 PMHi,
I've created an application using WPF (.Net 4) and SQL Server Compact 4.0 that is working just perfectly (VS 2012 + Windows 7). In my project the database opens with VS 2012 in the server explorer and I can explore the database without problems, but when I deployed the application (Windows XP Embedded), after it get used for a while, I got the sdf file and tryied to open in my VS 2012 and in the VS 2010 to see the data changes in it, but i get the error "Invalid Provider [ DB Version = 0, Requested Version = 1, File Name = <name>.sdf]" and I'm not able to see it.
Does anyone knows how to solve it?
Thanks in advance.
All Replies
-
Tuesday, November 27, 2012 10:10 AMModeratorSounds like the database may have been corrupted, try to run Repair
Please mark as answer, if this was it. Visit my SQL Server Compact blog
-
Tuesday, November 27, 2012 11:06 AM
Hi ErikEJ,
I've run the repair like descripted in http://msdn.microsoft.com/en-us/library/ms172420(v=sql.90).aspx but in the repair all my tables and data of the database (sdf) were deleted. In my database directory there was a log file that had the following contet:
Bad Checksum - idPage: 0, tyPage: 0, iPage: 0 Header checksum is valid. Source : C:\Users\Vinicius\Documents\ComboioHomologacao(Dados LDC).sdf Destination : n/a Verifying - verMajor: 0, verMinor: 0, verBuild: 0, verPoint: 0 Time - 2012-27-11 08:59:36.766 Database format in database header page is corrupt (or not a database file) All Pages have valid checksum. Parse the db file and build list of tables ... DONE. Cleanup Page list ... DONE. Scan bad pages ... DONE. Parse SysObjects table ... DONE. Copy Tables ... DONE. Bad Checksum - idPage: 0, tyPage: 0, iPage: 0 Header checksum is valid. Source : C:\Users\Vinicius\Documents\ComboioHomologacao(Dados LDC).sdf Destination : C:\Users\Vinicius\AppData\Local\Temp\sqlAA81.tmp Repairing - verMajor: 0, verMinor: 0, verBuild: 0, verPoint: 0 Time - 2012-27-11 08:59:43.933 Database format in database header page is corrupt (or not a database file) All Pages have valid checksum. Parse the db file and build list of tables ... DONE. Cleanup Page list ... DONE. Scan bad pages ... DONE. Parse SysObjects table ... DONE. Copy Schema ... DONE. Copy Tables ... DONE. Copy Constraints ... DONE. Copy Indexes ... DONE. Copy Constraints ... DONE.
Have I done the repair correctly?
Than you.
-
Tuesday, November 27, 2012 11:29 AMModerator
I think your database file is corrupted (in transfer, maybe?) beyond repair.Please mark as answer, if this was it. Visit my SQL Server Compact blog
- Marked As Answer by Vinicius Oliverio Wednesday, November 28, 2012 8:17 PM

