开发者

SQL CE in WP7 Mango - Datatype mapping from SQL Server 2008

开发者 https://www.devze.com 2023-03-27 23:46 出处:网络
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

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.

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 sai开发者_开发知识库d that the (MAX) will be converted to (4000).

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.

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

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

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?


I believe the page you're after is this one. SQL CE 3.5 is the same no matter what platform you're on, so the "WP7" part of the question doesn't matter.


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

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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消