[AccessD] Editing Records

Susan Harkins harkins at iglou.com
Wed Mar 5 09:04:18 CST 2003


Editing RecordsI didn't thoroughly check, but is there a reason you need to use a recordset to do this -- it looks to me like an Update query might be faster. 

Susan H. 


  ----- Original Message ----- 
  From: Swisher, Timothy B. 
  To: accessd at databaseadvisors.com 
  Sent: Wednesday, March 05, 2003 8:06 AM
  Subject: [AccessD] Editing Records


  Hello group, I have a procedure (A2k) that opens a recordset (DAO) and cycles through the data validating/updating several fields for each record.  My question is, what is the best way to do this, 

  Like this 

  .edit 
  If validation1 = false then 
          change data 
  End if 

  If validation2 = false then 
          change data 
  End if 
  .update 

  Or  

  If validation1 = false then 
          .edit 
          change data 
          .update 
  End if 

  If validation2 = false then 
          .edit 
          change data 
          .update 
  End if 

  I have about 13 validations that need to be done on about 90,000 records.  Each validation goes to a SQL Server BE and check the validity of the data.  There is a huge difference in speed opening and closing the recordset so many times, but if that is the better way to go, then so be it.  All help is appreciated.  TIA.

  Tim 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030305/e6b19d50/attachment-0001.html>


More information about the AccessD mailing list