简体   繁体   English

从DbType System.DateTimeOffset到已知的SqlCeType的映射不存在

[英]No mapping exists from DbType System.DateTimeOffset to a known SqlCeType

I have a SQL Server 2008 database that contains DateTimeOffset objects. 我有一个包含DateTimeOffset对象的SQL Server 2008数据库。 As per this page , 根据此页面

SQL Server Compact provides support for replicating the new data types in SQL Server 2008 such as date, time, datetime2, datetimeoffset, geography, and geometry. SQL Server Compact为复制SQL Server 2008中的新数据类型(例如日期,时间,datetime2,datetimeoffset,地理和几何)提供了支持。 The new data types in SQL Server 2008 are mapped to nchar, nvarchar, image, etc. For more information about data types in SQL Server 2008, see Data Types in SQL Server 2008 Books Online Documentation. SQL Server 2008中的新数据类型映射到nchar,nvarchar,图像等。有关SQL Server 2008中的数据类型的更多信息,请参见SQL Server 2008联机丛书中的数据类型。

However, when I use the Microsoft Sync Framework and try to sync my SQL Server database to a SQL Server Compact database, I get the following error: 但是,当我使用Microsoft Sync Framework并尝试将SQL Server数据库同步到SQL Server Compact数据库时,出现以下错误:

No mapping exists from DbType System.DateTimeOffset to a known SqlCeType. 从DbType System.DateTimeOffset到已知SqlCeType的映射不存在。

The relevant Microsoft Sync Framework documentation is here . 相关的Microsoft Sync Framework文档在此处 I am on SQL CE 3.5 SP2 and .NET Framework 4.0. 我使用的是SQL CE 3.5 SP2和.NET Framework 4.0。

I'm kind of lost here. 我有点迷路了。 What am I doing wrong? 我究竟做错了什么?

What version of ADO.NET and .Net Compact Framework are you using? 您正在使用哪个版本的ADO.NET和.Net Compact Framework? The docs for Sync FW v2.0 and v2.1 indicate that wrt datetimeoffset Sync FW v2.0v2.1文档指示wrt datetimeoffset

If the server provider is hosted on a computer that is running ADO.NET 2.0 SP1, ADO.NET 2.0 SP1 must also be available on the client for conversion to succeed. 如果服务器提供程序托管在运行ADO.NET 2.0 SP1的计算机上,则ADO.NET 2.0 SP1在客户端上也必须可用,以便成功进行转换。 Automatic conversion of datetimeoffset on the client is not supported by .NET Compact Framework 2.0 SP1 or .NET Compact Framework 3.5. .NET Compact Framework 2.0 SP1或.NET Compact Framework 3.5不支持在客户端上自动转换datetimeoffset。

That is consistent with your error. 那与你的错误是一致的。

不支持DateTimeOffset-文档中提到的类型转换是针对合并复制而不是Sync Framework的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从dbtype 30到已知sqldbtype的映射不存在 - No mapping exists from dbtype 30 to a known sqldbtype WCF代理中的System.DateTimeOffset与System.DateTimeOffset冲突 - System.DateTimeOffset in your WCF proxy conflicts with System.DateTimeOffset 不存在从 DbType UInt64 到已知 SqlDbType 的映射。 小巧玲珑 C# - No mapping exists from DbType UInt64 to a known SqlDbType. Dapper C# 无法隐式转换类型'System.DateTimeOffset?' 到'System.DateTimeOffset'。显式转换退出(您是否缺少演员表) - Cannot implicitly convert type 'System.DateTimeOffset?' to 'System.DateTimeOffset'.An explicit conversion exits(are you missing a cast) System.DateTime 和 System.DateTimeOffset 之间的区别 - Difference between System.DateTime and System.DateTimeOffset 无法将类型“bool”隐式转换为“System.DateTimeOffset?” - Cannot implicitly convert type 'bool' to 'System.DateTimeOffset?' 在Microsoft.OData.Edm.Date和System.Nullable System.DateTimeOffset类型之间没有定义强制运算符。 - No coercion operator is defined between types Microsoft.OData.Edm.Date and System.Nullable System.DateTimeOffset System.NotSupportedException:表达式树 {ExampleModel}{EndTime}.Month 中类型为 System.DateTimeOffset 的成员月份无法翻译 - System.NotSupportedException: Member Month of type System.DateTimeOffset in the expression tree {ExampleModel}{EndTime}.Month cannot be translated 从对象类型System.Web.UI.WebControls.GridViewRow到已知托管提供程序本机类型的映射不存在 - No mapping exists from object type System.Web.UI.WebControls.GridViewRow to a known managed provider native type 不存在从对象类型 System.Text.StringBuilder 到已知托管提供程序本机类型的映射 - No mapping exists from object type System.Text.StringBuilder to a known managed provider native type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM