Quoting from MSDN: "For variable-length data types, Size describes the maximum amount of data to transmit to the server. For example, for a Unicode string value, Size could be used to limit the amount of data sent to the server to the first one hundred characters." So, you should set the size to the largest expected size you can handle. For updates, set the size later (just before using it in the sqlCommand): ((SqlParameter)param_array[7]).size = mydata.length;