Solved

When you want to insert, update, or delete a record from a database, which ADO object would you use to accomplish this?

Posted on 2007-03-31
3
2,439 Views
Last Modified: 2008-01-09
When you want to insert, update, or delete a record from a database, which ADO object would you use to accomplish this? (ADOCommand, ADORecordSet, ADODataReader or ADOUpdater)
      
0
Comment
Question by:mabtahi
3 Comments
 
LVL 24

Accepted Solution

by:
DBAduck - Ben Miller earned 125 total points
ID: 18830911
I would use the ADOCommand.  You really do not expect a result so this would allow you to just execute a command.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 18831065
>>ADOCommand, ADORecordSet, ADODataReader or ADOUpdater<<
You seem to have mixed up ADO with ADO.NET, can you clarify which one you are asking about?
0
 
LVL 1

Expert Comment

by:cmwhite
ID: 18845412
.NET:
 For Select statements (Obviously a return expected) you would use OleDbDataReader, SqlDataReader
 For Update, Insert, Delete statements you would use OleDbCommand, SqlCommand

ADO:
For Select Statements you would use the database connection's execute method and use ADODB.recordset object to hold the returned data.
For update, insert, delete statements you would just use the db connection's execute method.

Hope this helps,

Chris
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now