[AccessD] Editing Records

Seth Galitzer sgsax at ksu.edu
Wed Mar 5 08:38:00 CST 2003


Tim,

You can do this much more efficiently with an update query, instead of
writing it all out by hand.  Even if you had to build more than one if
you can't do it in one fell swoop, it would still be easier and cleaner
than writing the code out.

Seth

On Wed, 2003-03-05 at 07:06, Swisher, Timothy B. wrote:
> 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
-- 
Seth Galitzer			sgsax at ksu.edu
Computing Specialist		http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University




More information about the AccessD mailing list