Batch update

  • Thread starter John Marshall, MVP
  • Start date
T

Ted Allen

Hi John,

I don't know of any papers, but I'll offer what I can.
Hopefully others will post their thoughts as well.

Usually when I need to do batch updates my first approach
is to use an update query. I think this is the fastest
and easiest way of doing updates if it is possible to
define what you want to do in the query.

As far as locating records, the options are somewhat
limited by the type of recordset and indexing. I think
that .Seek is probably faster than .Find, but it requires
a table type recordset and you have to specify an index
to be used.

The .Find family of search commands is much more
flexible, but probably slower.

Personally, I don't find myself using either of the above
very often though. If I need to loop through records
meeting a certain criteria, I usually just open a
recordset based on those criteria using a sql statement.
If the order of the records is important, I use an ORDER
BY clause in the sql statement so that they are properly
ordered. Then, I just loop through the records in the
recordset and make any necessary changes by starting at
the first record and using the recordset's .movenext
method to go through each one until the end of the field
is reached (.EOF).

This is all kind of general, but hopefully it will help
somewhat. Post back if you would like more detail on any
of the above.

-Ted Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top