[英]C# Is it possible to set a memory limit size for a DataTable object?
我知道DataTable具有最小容量属性,但是有最大容量属性吗? 在用数据填充对象时,如果达到最大大小会在哪里生成异常?
例如:
DataTable table = new DataTable();
using(SqlCommand cmd = new SqlCommand(sqlQuery, sqlConn))
{
SqlDataAdapter ds = new SqlDataAdapter(cmd);
da.Fill(table); //generate exception if DataTable is filled with too much data (e.g. over 100mb in size)
}
两部分答案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.