VisualStudio2010のWindowsPhone7プロジェクトにSQLCompackEdition v4.0ファイルを追加しました。データベースをアプリケーションフォルダーから分離ストレージにコピーしましたが、クエリを実行すると次のようになります。
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バージョンをどのように使用できますか?何をすべきか?System.Data.Linqファイルである可能性がありますか?(私のプロジェクトにはこのdllのv 2.0があります)