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,472 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SYbase 4 31
What's wrong with this T-SQL Foreign Key? 7 46
Create snapshot on MSSQL 2012 3 20
SQL Function NOT ROUND 9 10
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

810 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