0

我在 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)

4

2 回答 2

1

您只能在 Windows Phone 上使用 SQL Servver Compact 3.5 版数据库

于 2012-09-08T12:37:44.673 回答
-1

我们需要一些设置才能在 VS 2010 中使用 sql ce v4.0,点击 google 获取更多信息。

于 2012-09-08T02:05:59.323 回答