Can any one please explain which data type I can provide if I'm getting a bigger value

Hi,
I have a table header (ex: Table data information and observation),I need to store this value to a column “Table header” in database, I provided datatype as Varchar(Max),but I’m not able to store this header name, If table header name contains small data (ex:table data),I’m able to store it.

Can anyone please explain me to solve this if I’m getting big table header, which datatype i can provide.?

1 Like

HI @Chippy_Kolot

Try NVarchar

Else use Text

cheers

1 Like

Hi,

I tried using both data types still I’m getting error.

Remote Exception wrapping System.Data.SqlClient.SqlException:String or Binary data would be truncated.
The statement has been terminated.

1 Like

Hi @Chippy_Kolot

Can you check out this below link and which explains the reason of this type of error and the resolution

String or binary data would be truncated in SQL Server - DatabaseFAQs.com.

Regards
Gokul