Batch Update of an Access DB

Results 1 to 2 of 2

Thread: Batch Update of an Access DB

  1. #1
    Kevin Guest

    Default Batch Update of an Access DB

    I have an asp page that updates an Access table based upon form input. Typically, the update will include about 30 rows of data with about 7 fields per row.<BR><BR>Currently, I open a connection to the database and then start looping through the form fields to create a SQL update statement. I then do an objConn.Execute sqlSatement... I end up doing this for each record needing updating.<BR><BR>Occasionally this updating crashes the web server.<BR><BR>I am looking for the most efficient/best way to do batch record updates in Access. I have read that creating a recordset and doing the batch update through that is not the way to go. <BR><BR>-Should I do that batch update in a COM component?<BR>- Should I uses a query and use parameters to update?<BR><BR>Thanks for the help.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Batch Update of an Access DB

    Well, you could try wrapping a transaction around the sql. It&#039;s much more efficient (though I don&#039;t remember how many X according to the testing I did).<BR><BR>cn.BeginTrans<BR>Do while<BR>sql statements<BR>Loop<BR>cn.CommitTrans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts