Solved

BEST METHOD ??

Posted on 2000-02-25
8
124 Views
Last Modified: 2010-05-02
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

0
Comment
Question by:khacharn
  • 5
  • 3
8 Comments
 
LVL 4

Expert Comment

by:jkunal
ID: 2564109
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
 

Author Comment

by:khacharn
ID: 2599356
This question has a deletion request Pending
0
 
LVL 4

Expert Comment

by:jkunal
ID: 2599415
This question no longer is pending deletion
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 4

Accepted Solution

by:
jkunal earned 25 total points
ID: 2599416
Why did u do that?
0
 

Author Comment

by:khacharn
ID: 2603388
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
 
LVL 4

Expert Comment

by:jkunal
ID: 2603521
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
 

Author Comment

by:khacharn
ID: 2604967
kunal..are you an indian..I M
mail me at
khacharn@yahoo.com
we can be friends
Regards
Nitin
0
 
LVL 4

Expert Comment

by:jkunal
ID: 2610889
Sure Nitin
my id is jkunal@usa.net
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question