2012-09-08 69 views
0

我已經在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版本)

+1

的Windows Phone只有3.5數據庫 – ErikEJ

+0

工作@ErikEJ感謝埃裏克 – 1Mayur

+0

@ErikEJ請發表評論烏爾作爲回答,這樣我可以選擇它 – 1Mayur

回答

1

您只能使用SQL Servver緊湊verision 3.5數據庫與Windows Phone的

+0

thnx的信息,米現在使用3.5,它是行之有效的 – 1Mayur

-1

我們需要一些設置來使用VS 2010中的sql ce v4.0,點擊谷歌搜索瞭解更多信息。

+0

那我知道,我現在從網上搜索很長時間 – 1Mayur

相關問題