What is the difference between ADO and ADO.NET?
.NET Interview Questions and Answers
(Continued from previous question...)
17. What is the difference between ADO and ADO.NET?
ADO uses Recordsets and cursors to access and modify data. Because of its inherent design, Recordset can impact performance on the server side by tying up valuable resources. In addition, COM marshalling - an expensive data conversion process - is needed to transmit a Recordset. ADO.NET addresses three important needs that ADO doesn't address:
1. Providing a comprehensive disconnected data-access model, which is crucial to the Web environment
2. Providing tight integration with XML, and
3. Providing seamless integration with the .NET Framework (e.g., compatibility with the base class library's type system). From an ADO.NET implementation perspective, the Recordset object in ADO is eliminated in the .NET architecture. In its place, ADO.NET has several dedicated objects led by the DataSet object and including the DataAdapter, and DataReader objects to perform specific tasks. In addition, ADO.NET DataSets operate in disconnected state whereas the ADO RecordSet objects operated in a fully connected state.
In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. A recordset looks like a single table. If a recordset is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically
corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database.
In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object.
There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.
(Continued on next question...)
Other Interview Questions
- What is .NET?
- How many languages .NET is supporting now?
- How is .NET able to support multiple languages?
- How ASP .NET different from ASP?
- What is smart navigation?
- What is view state?
- How do you validate the controls in an ASP .NET page?
- Can the validation be done in the server side? Or this can be done only in the Client side?
- How to manage pagination in a page?
- What is ADO .NET and what is difference between ADO and ADO.NET?
- Observations between VB.NET and VC#.NET?
- Advantages of migrating to VB.NET ?
- Advantages of VB.NET
- Using ActiveX Control in .Net
- What is Machine.config?
- What is Web.config?
- What is the difference between ADO and ADO.NET?
- What is the difference between VB and VB.NET?
- What is a Strong Name?
- What is a Manifest?
- Creating a Key Pair?
- What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?
- What is GAC?
- What is a Metadata?
- What is managed code and managed data?
- What is .NET / .NET Framework?
- What is Reflection?
- What is "Common Type System" (CTS)?
- What is "Common Language Specification" (CLS)?
- What is "Common Language Runtime" (CLR)?
- What are Attributes?
- What are the Types of Assemblies?
- What is an Intermediate language?
- ASP.NET Authentication Providers and IIS Security
- What is the difference between ASP and ASP.NET?
- Using COM Component in .Net
- What is an assembly?
- What is a Web Service?
- webFarm Vs webGardens
- What is the difference between a namespace and assembly name?
- Whatís a Windows process?
- Whatís typical about a Windows process in regards to memory allocation?
- Explain what relationship is between a Process, Application Domain, and Application?
- What are possible implementations of distributed applications in .NET?
- What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?
- Whatís a proxy of the server object in .NET Remoting?
- What are remotable objects in .NET Remoting?
- What are channels in .NET Remoting?
- What security measures exist for .NET Remoting in System.Runtime.Remoting?
- What is a formatter?
- Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?
- Whatís SingleCall activation mode used for?
- Whatís Singleton activation mode?
- How do you define the lease of the object?
- Can you configure a .NET Remoting object via XML file?
- How can you automatically generate interface for the remotable object in .NET with Microsoft tools?
- What is Delegation?
- What is "Microsoft Intermediate Language" (MSIL)?
- Differences between Datagrid, Datalist and Repeater?
- I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this?
- How do you trigger the Paint event in System.Drawing?
- With these events, why wouldnít Microsoft combine Invalidate and Paint, so that you wouldnít have to tell it to repaint, and then to force it to repaint?
- How can you assign an RGB color to a System.Drawing.Color object?
- What class does Icon derive from? Isnít it just a Bitmap with a wrapper name around it?
- Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically?
- When displaying fonts, whatís the difference between pixels, points and ems?
- What is the difference between VB 6 and VB.NET?
- What are the authentication methods in .NET?
- What is Serialization in .NET?
- Whatís the use of System.Diagnostics.Process class?
- Difference Abstract class and Interface
- re-clarification of object based:
- How to achieve Polymorphism in VB.Net?
- Difference between Class And Interface
- What doesu mean by .NET framework?
- What is assembly?
- What is namespaces?
- NET framework overview
- What is the base class of .NET?
- Explain assemblies.
- Name some of the languages .NET support?
- ADO.NET features? Benefits? Drawbacks?
- How many types of exception handlers are there in .NET?
- Difference between Panel and GroupBox classes?
- What is the base class of Button control?
- What is Response object? How is it related to ASPís Response object?
- What is IIS? Have you used it?
- Main differences between ASP and ASP.NET.
- What are the advantages and drawbacks of using ADO.NET?
- what is the difference between user control an custom control? advantages/disadvantages?
- Whatís the difference between Response.Write() andResponse.Output.Write()?
- What is the use of ErrorProvider Control?
- What is CLR?
- What is Delegate and what is it used for ?
- How is meant by DLL ?
- Which DLL translate XML to SQL in IIS?
- Can anyone tell me about Secure Socket Layer? How to make use of the technology?
- What is the Differnce Between Response.write & response.output.Write
- Which dll is required to translate XML to SQL in IIS ?
- What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why.
- What is serialization, how it works in .NET?
- What should one do to make class serializable?
- What exactly is being serialized when you perform serialization?
- How does output caching work in ASP.NET?
- What is connection pooling and how do you make your application use it?
- What are different methods of session maintenance in ASP.NET?
- What is Viewstate?
- Can any object be stored in a Viewstate?
- What should you do to store an object in a Viewstate?
- Explain how Viewstate is being formed and how itís stored on client.
- What do you know about ADO.NETís objects and methods?
- Explain DataSet.AcceptChanges and DataAdapter.Update methods.
- When we go for html server controls and when we go for web server controls?
- ASP.NET interview questions only (1)
- ASP.NET interview questions only (2)
- ASP.NET interview questions only (3)