I have a table with one of the column defined with varchar(8000) wherein I cannot use any other datatype like Text, varchar(max)
I have checked the length of the variable. The problem is if the length of the variable is >7995 then it shoud be inserted into multiple rows each row containing maximum of 7994 characters.
Let's say the length of the variable is 100000, how to insert into multiple rows using C# in SQL Server. Please help me in doing so.
if (strResult.Length != 0)
{
if (strResult.Length < 7995)
{
DS.InsertParameters.Add("TEST", strResult);
DS.Insert();
LabelMessage.Text = "Inserted Successfully";
}
else
{
//What code should be here
}
}
else
{
LabelMessage.Text = "No data";
}