Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 10th, 2009, 04:00 AM
Authorized User
 
Join Date: Sep 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Question RECORDSET.UPDATE vs UPDATE QUERY

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

Thanks.
__________________
Get the will power n U will be powered
Reply With Quote
  #2 (permalink)  
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
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.