Are you doing automatic deployment from Visual Studio? If so, you need to
use the SqlFacet attribute with MaxSize = -1 as the default for SqlString is
nvarchar(4000). So...
public static void testU([SqlFacet(MaxSize=-1)] SqlString MDXString)
This will cause VisualStudio to make up DDL with varchar(max) type.
Hope this helps,
Bob Beauchemin
SQLskills
>I am using OPENQUERY in a CLR (for quering OLAP) and noticed that any
> string/sqlstring parameter assigned is limited to 4000 chars. As
[quoted text clipped - 19 lines]
> throw new Exception ("Length= "+i.ToString());
> }
mspzzz - 26 Jun 2008 12:16 GMT
That's it!!! Thx a lot!
> Are you doing automatic deployment from Visual Studio? If so, you need to
> use the SqlFacet attribute with MaxSize = -1 as the default for SqlString is
[quoted text clipped - 31 lines]
> > throw new Exception ("Length= "+i.ToString());
> > }
Adam Machanic - 26 Jun 2008 20:35 GMT
Or, use SqlChars rather than SqlString...
> Are you doing automatic deployment from Visual Studio? If so, you need to
> use the SqlFacet attribute with MaxSize = -1 as the default for SqlString
[quoted text clipped - 33 lines]
>> throw new Exception ("Length= "+i.ToString());
>> }
SvdSinner - 22 Sep 2008 18:18 GMT
> Or, use SqlChars rather than SqlString...
Just be aware that
[url=http://www.solidrockstable.com/blogs/PragmaticTSQL/Lists/Posts/Post.aspx?ID=26]S
qlChars appears to be broken in SQL2008[/url]. (Worked fine in 2005)
Adam Machanic - 28 Sep 2008 16:24 GMT
SqlChars is not broken; Visual Studio 2008 is broken. If you manually
deploy the assembly there is no issue.
>> Or, use SqlChars rather than SqlString...
>
> Just be aware that
> [url=http://www.solidrockstable.com/blogs/PragmaticTSQL/Lists/Posts/Post.aspx?ID=26]S
qlChars
> appears to be broken in SQL2008[/url]. (Worked fine in 2005)