BEST METHOD ??

hi all..
The question is :~
Whenever i want to retrieve some values from the database i do this..
---------------------------------------
dim sql,recordset,connection
set connection = createobject("Adodb.connection")
set recordset = createobject("Adodb.recordset")
sql = "sqlstatement"
recordset.open sql,con
---------------------------------------
# same is the case with insert and update statements..

NOW I KNOW THAT THERE ARE VARIOUS METHODS FOR DOING THE SAME THING..
I WANT TO KNOW WHAT ARE THEY AND WHICH IS THE BEST METHOD considering the time factor....
PLEASE HELP ASAP
Some code would help me more..
Regards
Nitin

khacharnAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jkunalConnect With a Mentor Commented:
Why did u do that?
0
 
jkunalCommented:
For selecting the records what you are doing is the best method.

Well for inserting a new record you can use
recordset.addnew
(fields)
recordset.update
But this method is only recomended if you have a recordset already open,
otherwise its a waste of resources.

update also works with

recordset.update...........
0
 
khacharnAuthor Commented:
This question has a deletion request Pending
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jkunalCommented:
This question no longer is pending deletion
0
 
khacharnAuthor Commented:
Hi Kunal..Thanx for the answer
But i am sure that there are more solutions..which are moer faster in processing..
anyway the solutino you have provided is good enough..
Regards
Nitin
0
 
jkunalCommented:
Nitin if there were any methods better than what were suggested you would have suerly got those as an answer or comments as EE site is full of very good and knowledgeable experts, eager to help you always.

;->
0
 
khacharnAuthor Commented:
kunal..are you an indian..I M
mail me at
khacharn@yahoo.com
we can be friends
Regards
Nitin
0
 
jkunalCommented:
Sure Nitin
my id is jkunal@usa.net
0
All Courses

From novice to tech pro — start learning today.