- 限制Application 字串長度
- 升級CU Hotfix
//Sample Code for limit string length DataSet dataSet = new DataSet(); DataTable customTable = new DataTable(); DataColumn dcName = new DataColumn("Name", typeof(string)); dcName.MaxLength= 500; customTable.Columns.Add(dcName); dataSet.Tables.Add(customTable);
DataTable objects are most commonly used as TVP values. DataTables are easy to use and can serve as containers for data beyond just TVP usage. But unlike DbDataReader and IEnumerable objects, a big gotcha with a DataTable is that the default data type String with maximum length of -1 (2GB LOB). This is the .NET equivalent of the SQL Server nvarchar(MAX) data type and has many insidious and negative implications with a TVP.