Reputation: 4469
I have a file that I think is a SSCE database, however I'm not sure. I say I'm not sure because I've tried all sorts of tools to open the file and they all fail. VS2010 SQL Server Compact Edition 4 reports "Incompatible Data Version. If this was a compatible file, run repair. For other cases refer to documentation. [ db version = 0,Requested version = 0,File name = template.sdf ]"
that I'm using the wrong version. VS2010 SQL Server Compact Edition 3.5 reports "This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Edition."
Here is the header of the file:
........SSCE Database ..........KÿÕ.´'N*äq0‘’á..=ß.\F³bê\I@-.–‚S¾Bš–õûcp˜–”é>•@l‚“:aƒÍ.å‡{‚šÓüpT>I9‹ß.‰Ò…Ñ=¿]`_Ò#"”îb„ÀÜO,Ú.BRa´©¡ÑX‚æ.-..YèB.0r.9VP.!º™Ú..—»Ñùa.8ié.Ç.z).jÚˆž.û.!.ƒªí°.A¯7©šþÊ4‹˜±ÍRaÜç.(.À.ðÁq/.,V®Ï0.ý½‘.m2(Š;Júl#º3¤¼Ùú(.dÃC.WHôÙj½™¡f.ˆû¯{ÆŸ¹.1—ê‚rO(qà.Ìø(Ò"¤~gž!¸ö..¦…lØ....1.0
and in hex:
00 00 00 00 00 01 00 00 53 53 43 45 20 44 61 74 61 62 61 73 65 20 20 00 00 00 00 00 02 00 00 00 00 4B FF D5 AD B4 27 4E 2A E4 71 30 91 92 E1 07 01 3D DF 11 5C 46 B3 62 EA 5C 49 40 2D 04 96 82 53 BE 42 9A 96 F5 FB 63 70 98 96 94 E9 3E 95 40 6C 82 93 3A 61 83 CD 8D E5 87 7B 82 9A D3 FC 70 54 3E 49 39 8B DF 0D 89 D2 85 D1 3D BF 5D 60 5F D2 23 22 94 EE 62 84 C0 DC 4F 2C DA 8D 42 52 61 B4 A9 A1 D1 58 82 E6 0A 2D 09 16 59 E8 42 04 30 72 0A 39 56 50 8D 21 BA 99 DA 00 14 97 BB D1 F9 61 AD 38 69 E9 1C C7 0E 7A 29 8D 6A DA 88 9E 05 FB 05 21 1A 83 AA ED B0 03 41 AF 37 A9 9A FE CA 34 8B 98 B1 CD 52 61 DC E7 01 28 1D C0 0C F0 C1 71 2F 1F 2C 56 AE CF 30 08 FD BD 91 00 6D 32 28 8A 3B 4A FA 6C 23 BA 33 A4 BC D9 FA 28 81 64 C3 43 1C 57 48 F4 D9 6A BD 99 A1 66 00 88 FB AF 7B C6 9F B9 10 31 97 EA 82 72 4F 28 71 E0 18 CC F8 28 D2 22 A4 7E 67 9E 21 B8 F6 81 1E A6 85 6C D8 01 00 00 00 31 2E 30
I'm pretty sure the file isn't password protected or encrypted because I can scroll down in the hex editor and see all the contents of the text fields.
Does anyone have any suggestions for opening this file, or even better, processing it with a .Net program?
UPDATE: I now know that it is a SQL Server Compact version 2.0 database. (Thanks @ErikEJ) Now I need to figure out how to open and update it from VS2010. I'm still open to ideas on that. I've tried a connection string of: Provider=Microsoft.SQLServer.OLEDB.CE.2.0;Data Source=template.sdf
but I received the error: The 'Microsoft.SQLServer.OLEDB.CE.2.0' provider is not registered on the local machine.
Upvotes: 1
Views: 1166
Reputation: 41759
Download the SQL Server Compact Toolbox standalone from here http://sqlcetoolbox.codeplex.com/releases/view/69910 and test the version with the "Detect SQL Server Compact file version" feature. There are some internal file versions used by some Windows apps that cannot be opened with standard tools.
Upvotes: 2