ADO Programming

Moderators: None (Apply to moderate this forum)
Number of threads: 87
Number of posts: 225

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Add New,Update Vs. Execute ?? Posted by Benny_A on 12 Mar 2006 at 11:02 AM
I use two common method to insert, update or delete records on database, they are
//rs is adodb.recordset
rs.addnew
rs!Id = text1.text
rs!Name = .....
..
.
rs.update

AND
//db is adodb.connection
db.execute(<sql syntax>)


the Qustions are :
which one do you think the best to use???
why you choose it??
any other simple&powerful method to doing this??

Thanks
Report
Re: Add New,Update Vs. Execute ?? Posted by Termc1224 on 26 May 2006 at 8:18 PM
: I use two common method to insert, update or delete records on database, they are
:
: //rs is adodb.recordset
: rs.addnew
: rs!Id = text1.text
: rs!Name = .....
: ..
: .
: rs.update
: 

: AND
:
: //db is adodb.connection
: db.execute(<sql syntax>)
: 

:
: the Qustions are :
: which one do you think the best to use???
: why you choose it??
: any other simple&powerful method to doing this??
:
: Thanks
:
Execute require you to create a stored procedure in SQLserver and just call it anytime and much faster than new, update. but if you do not know how to create a stored procedure then use new, update.
Report
Re: Add New,Update Vs. Execute ?? Posted by junjiecute on 10 Apr 2007 at 10:43 PM
I think the difference between the add new, UPdate is the execution of information. Here is what I mean

when you do...
with rs
.addnew
.fields(0) = "x"
.update
end with

It process the data through the client then request update from the server since you are using the ADO control. It uses your Physical memory.


And when you do...

rs.execute(<SQL>)

It requests the SQL to be processed server side since you are passing the whole request into the server without having it processed through the control.

Correct me if I am wrong but this is how I understand this.

^_^



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.