Cannot store 2000 characters in varchar(7000)
-
Hi, I have some text which has a lot of newlines. I checked the amount of text in an editor. It showed about 2000 characters. When I tried to save this text in an varchar field of 7000 width an error was generated saying about character limit. Why is this happening? Is it due to the newline characters. Thanks - बुरा जो देखण मै चला, बुरा न िमलया कोय, जो मन खोजा आपणा तो मुझसे बुरा न कोय। Translation
-
Hi, I have some text which has a lot of newlines. I checked the amount of text in an editor. It showed about 2000 characters. When I tried to save this text in an varchar field of 7000 width an error was generated saying about character limit. Why is this happening? Is it due to the newline characters. Thanks - बुरा जो देखण मै चला, बुरा न िमलया कोय, जो मन खोजा आपणा तो मुझसे बुरा न कोय। Translation
Dinuj Nath wrote:
Why is this happening? Is it due to the newline characters.
Each newline character will count as one character, did you include this count in your original 2000. You may be better off with a ntext column rather than relying on a varchar Michael CP Blog [^] Development Blog [^]
-
Dinuj Nath wrote:
Why is this happening? Is it due to the newline characters.
Each newline character will count as one character, did you include this count in your original 2000. You may be better off with a ntext column rather than relying on a varchar Michael CP Blog [^] Development Blog [^]
Thanks for the reply. The count is using the count characters util in scite editor and by the way there won't be more than 20 newline chars. I have been forced to use text and it is eating up space. I just can't understand why I just can't store some thousand simple chars in varchar(7000).
-
Hi, I have some text which has a lot of newlines. I checked the amount of text in an editor. It showed about 2000 characters. When I tried to save this text in an varchar field of 7000 width an error was generated saying about character limit. Why is this happening? Is it due to the newline characters. Thanks - बुरा जो देखण मै चला, बुरा न िमलया कोय, जो मन खोजा आपणा तो मुझसे बुरा न कोय। Translation
What version of SQL Server? If SQL 2000, is the row size within the page limit? In MS SQL Server versions prior to 2005, one row's data is limited to fit in one page or an 8kb block. (But the definition of a table can show a total of more than 8kb per row if you have one or more variable length columns.)
-
What version of SQL Server? If SQL 2000, is the row size within the page limit? In MS SQL Server versions prior to 2005, one row's data is limited to fit in one page or an 8kb block. (But the definition of a table can show a total of more than 8kb per row if you have one or more variable length columns.)
Thanks a lot. Its Sql Server 2000.