|
|
 |
| 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.
|
 |

October 10th, 2009, 05:00 AM
|
|
Authorized User
|
|
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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
|

October 10th, 2009, 05:46 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |