View Single Post
  #2 (permalink)  
Old October 10th, 2009, 04:46 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Well, for one thing, the database driver you are using must support Recordset Update. Some versions of MyODBC for MySQL, for example, do not.

But the big difference is that the ADO-based Recordset Update means that the client must *first* read the needed record from the DB into client memory, then your code makes the changes to one or more fields, then ADO actually performs the update by using--what else?--a SQL Update query behind the scenes. (Some database drivers may be able to bypass the SQL update, but the important part is that the data MUST flow "both ways.")

With a SQL Update query, the data only flows one way, from client to server.

If you are only updating one or two fields in a record with many many fields, the SQL Update can be MANY MANY times faster. Because so little data has to be moved.

On the other hand, if you are coding a "rich client" app where the user sees the existing data and is allowed to make changes and then you update the DB...well, you had to SELECT the data, anyway. So you might as well use the ADO update.