Introducing ADO.NET Chapter 1 Most applications need to handle data, whether it is in the form of a database, a text file, or a spreadsheet. For a majority of modern-day applications, smooth data access has become crucial because voluminous amount of data is maintained in the databases. Therefore, to access this data the applications need to implement the functionality whereby they can interact with various databases, such as Microsoft SQL Server, Oracle, and MS Access. These functionalities are based on the varied requirements of the user. For example, a user may require only retrieval of data, while another user may require both retrieval and updation of data. To provide these functionalities, ADO.NET is used as a data access technology. ADO.NET can be used with all .NET Framework compliant programming languages, such as Visual Basic.NET, VC#.NET, and Visual C++. This chapter introduces the ADO.NET object model. In addition, it explains how to create and manage connections to a data source. In this chapter, you will learn to: 7Understand the ADO.NET object model 7Create and manage connections Objectives
¤NIIT Introducing ADO.NET 1.3 In organizations, business applications need to manage voluminous data. Data is stored in a relational database in the form of related tables. Retrieving and manipulating data directly from a database requires the knowledge of database commands. This may at times become a limitation because everyone may not be conversant with database commands. For example, updating the data stored in a SQL Server database may not be convenient for a person who does not know DML (Data Manipulation Language) commands or statements. To overcome this limitation, business applications allow users to retrieve data stored in a database and present it in a user-friendly interface, without having to write database commands. The user can even add, delete, and update database records directly from these applications. Microsoft has created a family of data access technologies to help programmers build efficient applications to manage data, regardless of its source. The following are the guidelines for selecting data access technology to be used in your application: ¡If you are writing a managed code targeting the .NET Framework in Visual Basic, C#, or C++, you should use ADO.NET. ¡If you are writing a native code targeting Windows by using C or C++, you should use Microsoft Open Database Connectivity (ODBC). ¡If you are writing a Microsoft Active Server Pages (ASP)-based application, a VB 6 Component Object Model (COM) application, or a C++ application that is already using COM, you should use Object Linking and Embedding (OLE) DB. ¡If you are writing a Java code targeting SQL Server, you should use Java Database Connectivity (JDBC).