I have this string “SP-CTe-10-10-2012”. SQL insertion gives this error “string or binary would be truncated, “
I have tried this :
string verapli1 = _infProt_verAplic.ToString();
string verapli2 =verapli1.Substring (verapli1.Length ,20);
to reduce the length of the string but this code has the error too.
Your column string length is lower than your string length.
Increase datatype length (try changing the column type to
varchar(20)) or decrease length of value before insertion.