PC Review


Reply
Thread Tools Rate Thread

Optimizing multiple rows storing into Access 2003. Need Help!

 
 
yachea2002@hotmail.com
Guest
Posts: n/a
 
      26th Jan 2005
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
 
Reply With Quote
 
 
 
 
Larry Woods
Guest
Posts: n/a
 
      26th Jan 2005
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

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Need (more) help optimizing for SQL BackEnd S.Clark Microsoft Access 3 20th Sep 2009 05:27 AM
User Images: Storing in Files VS Storing in Database Jonathan Wood Microsoft ASP .NET 1 2nd Jun 2008 06:56 PM
Importing CSV file into single column/multiple rows vs. multiple rows/single column bjorgenson@charter.net Microsoft Excel Discussion 3 27th Jun 2005 08:25 PM
Optimizing multiple rows storing into Access 2003. Need Help! yachea2002@hotmail.com Microsoft Access Queries 1 26th Jan 2005 12:05 PM
Optimizing multiple rows storing into Access 2003. Need Help! yachea2002@hotmail.com Microsoft Access 1 26th Jan 2005 12:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:50 PM.