我在 Visual Studio 2010 的 windows phone 7 项目中添加了 sql comppack edition 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"
当我从我的视觉工作室添加这个文件时,这个东西如何使用 3.5 版本?该怎么办?可能是因为 System.Data.Linq 文件吗?(我的项目有这个 dll 的 v 2.0)