p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 10th, 2009, 05:00 AM
Authorized User
Points: 70, Level: 1
Points: 70, Level: 1 Points: 70, Level: 1 Points: 70, Level: 1
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
Join Date: Sep 2009
Posts: 13
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 10th, 2009, 05:46 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update Recordset using oledb.command jmhemadri Classic ASP Databases 5 September 11th, 2008 04:46 PM
I solved insert query.now see this Update Query. amit_mande@yahoo.com VB.NET 2002/2003 Basics 2 September 21st, 2006 01:48 AM
Diff between Recordset.update & insert cmd mp3pm VB Databases Basics 6 September 1st, 2006 04: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 11:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc