Link to home
Start Free TrialLog in
Avatar of khacharn
khacharn

asked on

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

Avatar of jkunal
jkunal
Flag of India image

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...........
Avatar of khacharn
khacharn

ASKER

This question has a deletion request Pending
This question no longer is pending deletion
ASKER CERTIFIED SOLUTION
Avatar of jkunal
jkunal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.

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