Optimizing multiple rows storing into Access 2003. Need Help!

Y

yachea2002

Hi I am looking for a way to optimize my data storing into an Access
2003 Table (the mdb file I am using is Access 2000 version)

oleDbDataAdapter seem to write one row at time even if it receives
multiple rows

I tried this code below

CalBackFunc() <- My call back func is called every second approx
{
.......

TypedDataSet1.Merge(…… ) //<- My main dataset in updated here


if(CycleCount>20)
{
CycleCount=0; //<- Every 20 times I make an update into the
//- database to reduce the I/O stuff
MyDt=new MyTypedDataSet();

MyDt.Merge(TypedDataSet1.MyTable1.GetChanges()); <- I copy
//the new data here

TypedDataSet1.MyTable1.AcceptChanges();

oleDbDataAdapter1.Update(MyDt.MyTable1); <-I make my storing
into the database here with 20 rows each time

}

}


This don't seem to work as I want it; I am looking if there is an
auther way to store multiple rows in the same time into Access
database.

Maybe like storing into an xml file and periodically store it back to
the database in one shot.


Could some one tell me how can I optimize this kind of storing, it
would be very healpful.

Thanks a lot

Yachea
 
L

Larry Woods

Hi,

I'm a little confused by your request. Rows are written into a database ONE
row at a time...regardless of how you send the rows to the database
provider. You cut some overhead by including all of your inserts/updates
before requesting oledbDataAdapter.Update(...) but the rows will still be
written to the database one row at a time.

Larry Woods
 
Top