[AccessD] Updating a specific record using VBA.

Bobby Heid bheid at sc.rr.com
Fri Oct 24 16:33:29 CDT 2008


Gustav,

Well, I have been at it for a while.  I did know that for many records, it
can be faster to use edit/add, but I have come across times where it was
faster to use the execute SQL method.  I do not know if had to do with
indexes or what.

Also, based upon the OP's original post, I could not tell for sure how many
records were being inserted/updated at once time.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Friday, October 24, 2008 3:05 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Updating a specific record using VBA.

Hi Bobby

For a single update that may be true but for many records like in a loop it
is indeed not.
That's one of the ways you can pinpoint an ASP or old-school VB programmer -
they write code using endless series of sql execute methods.

I once cleaned up an application made in Access but converted from a
previous VB application by someone else. It was well done - no sloppy code -
but the client complained about the slowness of an update routine. It ran
several interrelated loops retrieving, verifying, and uploading data and
pictures from/to an FTP server where all datatable manipulation was done
calling SQL code. I transferred this to a system of recordsets and the speed
increase was so high that I hardly believed it myself - and I gained eternal
guru status at the client!

Thus, as you write:

> .. the .edit/.add methods do have their place.

/gustav


>>> bheid at sc.rr.com 24-10-2008 03:57 >>>
I believe in many cases that the sql methods are faster.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list