System.Data.OleDb.OleDbDataAdapter da;
System.Data.DataSet ds;
System.Data.DataTable dtSource;
---------------------------------------------------da = new OleDbDataAdapter (sSql, conn);
ds = new DataSet();
//Fill the DataSet.
da.Fill(ds, "operationDB");
//Set the source table.
dtSource = ds.Tables["operationDB"];每次在执行da.Fill(ds, "operationDB");后内容都回变大查询2000条数据会有20M内存增大,而后每次在电击查询,还有有1-3M的增大。这可怎么办呢?
尝试过
if (ds !=null){ds.Dispose();}
if (da !=null){da.Dispose();}
添加但是没有效果!
System.Data.DataSet ds;
System.Data.DataTable dtSource;
---------------------------------------------------da = new OleDbDataAdapter (sSql, conn);
ds = new DataSet();
//Fill the DataSet.
da.Fill(ds, "operationDB");
//Set the source table.
dtSource = ds.Tables["operationDB"];每次在执行da.Fill(ds, "operationDB");后内容都回变大查询2000条数据会有20M内存增大,而后每次在电击查询,还有有1-3M的增大。这可怎么办呢?
尝试过
if (ds !=null){ds.Dispose();}
if (da !=null){da.Dispose();}
添加但是没有效果!
在da.Fill前先da.Clear();