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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

746 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

12 Experts available now in Live!

Get 1:1 Help Now