Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 10th, 2009, 04:00 AM
Authorized User
Join Date: Sep 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts

what the difference between Recordset.update and Update query??

Get the will power n U will be powered
Old October 10th, 2009, 04:46 PM
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.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update Recordset using oledb.command jmhemadri Classic ASP Databases 5 September 11th, 2008 03:46 PM
I solved insert query.now see this Update Query. amit_mande@yahoo.com VB.NET 2002/2003 Basics 2 September 21st, 2006 12:48 AM
Diff between Recordset.update & insert cmd mp3pm VB Databases Basics 6 September 1st, 2006 03:54 PM
Recordset Update question smarks Classic ASP Databases 2 March 14th, 2005 03:57 AM
Update table with a recordset - help!!! chacquard Access VBA 3 February 17th, 2004 08:06 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.