我已經在visual studio 2010的windows phone 7項目中添加了sql compack edition v4.0文件。我將數據庫從應用程序文件夾複製到隔離存儲,現在查詢它給這個東西visual studio 2010使用SQLCe 3.5,但項目有4.4 sdf文件
countyList.Count()
A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in Microsoft.Phone.Data.Internal.dll
'countyList.Count()' threw an exception of type 'System.Data.SqlServerCe.SqlCeException'
base {System.Data.Common.DbException}: {"Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"}
_customMessage: "Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"
_errors: {System.Data.SqlServerCe.SqlCeErrorCollection}
Errors: {System.Data.SqlServerCe.SqlCeErrorCollection}
HResult: -2147467259
Message: "Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053,File name = AMEDatabase.sdf ]"
NativeError: 28609
Source: "SQL Server Compact ADO.NET Data Provider"
當我從Visual Studio中添加文件這件事情如何使用3.5版本? 該怎麼辦? (我的項目有這個DLL的2.0版本)
的Windows Phone只有3.5數據庫 – ErikEJ
工作@ErikEJ感謝埃裏克 – 1Mayur
@ErikEJ請發表評論烏爾作爲回答,這樣我可以選擇它 – 1Mayur