One of our SQL Server column was recently modified from varchar
to nvarchar
, as a result the max_length value in sys.tables
doubled. In the vb counterpart, our SQLMetadata
objects were instantiated using the character length of the column, the last parameter of the constructor being the max length.
Should the SQLMetadata
parameter be changed to use the nvarchar
max length in bytes or left the way it is (character length of the SQL column)?
SQLMetadataObj = new SqlMetaData("Column1", SqlDbType.NVarChar, 12)
Any help would be appreciated
Thanks