Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 10, 2010 01:13 PM by Hong-Gang Chen - MSFT
Aug 04, 2010 02:58 PM|LINK
I have been using a function that replaces some characters from my editor in asp.net with '+CHAR(x)+' to chain together a string with characters such as single quote that would otherwise break the query, i know how to escape the character using double single
quote but i was wondering why i get this problem.
The problem is that when the string gets too long about 7kb to 8kb its gets cut off for no reason, no error message gets displayed, the query is successful only the string cuts off at a point. When i escape the character without using '+CHAR(x)+' to add
the character i can add a very long string that does not cut off, i am using Varchar(max) for my field, (have also tried text).
I am using sql 2008 express edition, and encounter this problem when i paste the generated query into sql management studio, and when i execute the query from asp.net code.
Does anybody know why this occurs?
I Have solved the problem by using character escaping but would like to know why the string cuts out (only inserts partial contents when the string is chained together with the CHAR function.
Any help would be appreciated.
SQL 2008 Field size limit problem
Aug 10, 2010 01:13 PM|LINK
" ' " is a special character and we can
use double single quote instead one single quote to solve this issue.