开发者

Using nvarchar(MAX) on a mobile device

开发者 https://www.devze.com 2023-03-25 23:51 出处:网络
We are developing apps in .NET (Compact) Framework 2.0 for desktops and PPC devices running either WinCE or WinMobile 6.5

We are developing apps in .NET (Compact) Framework 2.0 for desktops and PPC devices running either WinCE or WinMobile 6.5

Recently we started using SQL Server 2005 and its new feature, nvarchar(max). All works fine on desktops. But on PPCs, we get the following problem:

The ParameterSize must be specified as -1 for nvarchar(max) SQL parameters. This works fine on desktops (full framework 2.0), but on the PPC, exception occurs:

System.ArgumentException : Invalid parameter Size value -1. The value must be greater than or equal to 0.

I think we have a proper开发者_如何学编程 CAB file installed for working with SQL Server from the mobile device (found in Microsoft SQL Server 2005 Mobile Edition Device SDK, named something like sql.wce5.armv4i.cab), but I cannot test this right now as I don't have the device.

The question is: Is nvarchar(max) supported on Compact Framework 2.0, SQL Server 2005 mobile device platform or not? How do I make it work?


nvarchar(max) is not supported on SQL Server Compact. See this link: MSDN

You can use ntext instead.

0

精彩评论

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

关注公众号