title: Using nvarchar(MAX) on a mobile device
body: <p>We are developing apps in .NET (Compact) Framework 2.0 for desktops and PPC devices running either WinCE or WinMobile 6.5</p>
  
  <p>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:</p>
  
  <p>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: </p>
  
  <p>System.ArgumentException : Invalid parameter Size value -1. The value must be greater than or equal to 0.</p>
  
  <p>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.</p>
  
  <p>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?</p>