Hi,
I have a C# application (Visual Studio 2005) that invloves reading a large amount of data from SQL server (in this case SQL 2005). Here is what I am trying to do.
//declare a data set obeject
DataSet accountRecord = new DataSet();
DataSet oDS = new DataSet();
//query database useing the OdbcConnection connection
//loop thru all the records
//insert a new row in another database. assuming the connection exists
odr = oDS.Tables[0].NewRow();
odr[field name] = value;
//update dataset
oDS.Tables[0].Rows.Add(odr);
//save data in table.
oAdapter.Update (oDS);
//end loop
When the internal loop is being executed the memory usage goes on increasing till I get an System.OutOfMem ory exception. Can you tell me the cause of the memory increasing in the for loop. Please let me know if you need more information.
Sincerely,
Saurabh
I have a C# application (Visual Studio 2005) that invloves reading a large amount of data from SQL server (in this case SQL 2005). Here is what I am trying to do.
//declare a data set obeject
DataSet accountRecord = new DataSet();
DataSet oDS = new DataSet();
//query database useing the OdbcConnection connection
//loop thru all the records
//insert a new row in another database. assuming the connection exists
odr = oDS.Tables[0].NewRow();
odr[field name] = value;
//update dataset
oDS.Tables[0].Rows.Add(odr);
//save data in table.
oAdapter.Update (oDS);
//end loop
When the internal loop is being executed the memory usage goes on increasing till I get an System.OutOfMem ory exception. Can you tell me the cause of the memory increasing in the for loop. Please let me know if you need more information.
Sincerely,
Saurabh
Comment