我正在尝试使用数据集生成报告,以便从SQL Server数据库中获取超过300000条记录。但它给了我以下错误:
Exception of type 'System.OutOfMemoryException' was thrown
ClaimDS ds = new ClaimDS();
sp_CustomForms_UCAF_SummaryTableAdapter adapt = new sp_CustomForms_UCAF_SummaryTableAdapter();
adapt.Fill(ds.sp_CustomForms_UCAF_Summary, x.amID,0,0,0,_fromdate,_todate,0);
ds.Dispose();
ds.Clear();
在调用adapt.Fill(ds.sp_CustomForms_UCAF_Summary, x.amID,0,0,0,_fromdate,_todate,0);
后会立即显示此错误。