WP7 Mango中的SQL CE-SQL Server 2008中的数据类型映射 [英] SQL CE in WP7 Mango - Datatype mapping from SQL Server 2008

查看:89
本文介绍了WP7 Mango中的SQL CE-SQL Server 2008中的数据类型映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了有关在.NET中sql server 2008和sql ce 3.5之间映射数据类型的建议的msdn文档.这实际上显示了一个颜色编码的矩阵. 很遗憾,我现在无法找到它的链接.

I found a msdn doc on recommendations for mapping datatypes between sql server 2008 and sql ce 3.5 in .NET. This actually shows a color coded matrix. Unfortunately I am not able to find the link to it now.

但是,该文档建议使用VARCHAR(MAX)/NVARCHAR(MAX)和DATETIME2,以便在.NET将它们转换为字符串& DateTime,它们会 更好匹配 数据类型限制.据说(MAX)会转换为(4000).

However, that doc recommended to use VARCHAR(MAX) / NVARCHAR(MAX) and DATETIME2 so that when .NET converts them to string & DateTime, they would better match the datatype limits. It was said that the (MAX) will be converted to (4000).

但是当我尝试使用它们在DataContext中定义ColumnAttribute时,使用(MAX)和DATETIME2会导致编译和运行时错误.因此,我恢复为(1000)和DATETIME.

But when I tried to use them to define the ColumnAttribute in a DataContext use of (MAX) and DATETIME2 were giving compilation and runtime errors. So, I reverted to (1000) and DATETIME.

现在此文档位于" SQL之间的差异Server Compact和SQL Server "表明,SQL CE 3.5及更高版本均支持DATETIME2. 2008.

Now this doc on "Differences Between SQL Server Compact and SQL Server" tells that DATETIME2 is supported in both SQL CE 3.5 & 2008.

当我尝试搜索与wp7的sql ce 3.5兼容性"时,没有得到任何有用的文档.

When I try to search for "sql ce 3.5 compatibility with wp7", I am not getting any useful document.

是否有帮助文档详细说明了WP7的SQL CE 3.5中允许的数据类型以及它们如何映射到SQL Server 2008数据类型?

Is there any help doc detailing the datatypes allowed in SQL CE 3.5 for WP7 and how they map to SQL Server 2008 datatypes?

推荐答案

我一直在寻找自己,并且浏览了此页面: http://msdn.microsoft.com/en-us/library/ms172424(SQL.110).aspx

I've just been looking for this myself and came across this page: http://msdn.microsoft.com/en-us/library/ms172424(SQL.110).aspx

好像WP7使用SQL CE 4.0,我们需要坚持使用datetime和ntext.

Looks like WP7 uses SQL CE 4.0 and we need to stick to datetime and ntext.

我在此页面上找到上面的链接:

I found the link above on this page: http://msdn.microsoft.com/en-us/library/hh202872(v=VS.92).aspx

这篇关于WP7 Mango中的SQL CE-SQL Server 2008中的数据类型映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆