2

I have a column in table with text datatype and trying to save some string value to this column from C# code. Issue comes when I use some very large string.

I am not able to save more than 43679 character into text field. I know text size can be 2^31.

I also tried saving same value from SSMS and noticed same scenario.

There is nothing special about code, but still SQL query is given below...

update TableName
set ColumnName = 'some text more than 43679 char'
where id=<some int id>

just to mention... column is declare in table as

[columnname] [text] NULL

Can anyone tell me what could be wrong.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Abhash786
  • 881
  • 2
  • 24
  • 53

1 Answers1

0

You can try to use varchar(max) to store huge amount of data. See MSDN

We recommend that you store large data by using the varchar(max), nvarchar(max), or varbinary(max) data types. To control in-row and out-of-row behavior of these data types, use the large value types out of row option.

You can also check the same issue here: SSMS - Can not paste more than 43679 characters from a column in Grid Mode

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331