Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: ADO
Expertise: Beginner
May 22, 2000

Adding a New Record to ADO

Question:
I know there are two ways to insert a new record. One way is to execute a Insert statement, the other way is use the recordset.AddNew method.

In terms of performance, which one is better? When dealing with the memo field, which may contain single quotes or double quotes, is AddNew method the only way to go?

Answer:
The INSERT statement will give you better performance because you don't have to create and pass around a recordset object. However the Recordset object gives you protection from data conflicts by raising an error if the user tries to update a record that has been modified by another user. So if you can do without the data conflict protection and want the performance then use a connection object to execute a SQL statement.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap