ADO NET 3 1 The ADO and ADO

  • Slides: 55
Download presentation
ADO. NET 3. 1 The ADO and ADO. NET Active. X Data Object (ADO)

ADO. NET 3. 1 The ADO and ADO. NET Active. X Data Object (ADO) is developed based on Object Linking and Embedding (OLE) and Component Object Model (COM) technologies. For recent decade, ADO has been the preferred interface for Visual Basic programmers to access various data sources, with ADO 2. 7 being the latest version of this technology. The development history of data accessing methods can be traced back to the mid-1990 s with Data Access Object (DAO), and then followed by Remote Data Object (RDO), which was based on the Open Database Connectivity (ODBC). In the late 1990 s, the ADO that is based on OLEDB is developed. ADO. NET is a new version of ADO and it is based mainly on the Microsoft. NET Framework. The underlying technology applied in ADO. NET is very different from the COM-based ADO. 12/22/2021 1

Chapter 3 Introduction to ADO. NET In this chapter, you will: n n n

Chapter 3 Introduction to ADO. NET In this chapter, you will: n n n Learn the basic classes in ADO. NET and its architecture Learn the different ADO. NET Data Providers Learn about the Connection and Command components Learn about the Parameters collection component Learn about the Data. Adapter and Data. Reader components Learn about the Data. Set and Data. Table components 12/22/2021 2

3. 2 n n Overview of the ADO. NET is a set of classes

3. 2 n n Overview of the ADO. NET is a set of classes that expose data access services to the Microsoft. NET programmer. ADO. NET provides a rich set of components for creating distributed, data-sharing applications. ADO. NET is an integral part of the Microsoft. NET Framework, providing access to relational, XML, and application data. All ADO. NET classes are located at the System. Data namespace with two files named System. Data. dll and System. Xml. dll. When compiling code that uses the System. Data namespace, reference both System. Data. dll and System. Xml. dll. Basically speaking, ADO. NET provides a set of classes to support you to develop database applications and enable you to connect to a data source to retrieve, manipulate and update data with your database. 12/22/2021 3

Chapter 3 Introduction to ADO. NET The classes provided by ADO. NET are core

Chapter 3 Introduction to ADO. NET The classes provided by ADO. NET are core to develop a professional data-driven application and they can be divided into the following three major components: n n n Data Provider Data. Set Data. Table These three components are located at the different namespaces. The Data. Set and the Data. Table classes are located at the System. Data namespace. The classes of the Data Provider are located at the different namespaces based on the types of the Data Providers. 12/22/2021 4

Chapter 3 Introduction to ADO. NET Data Provider contains four classes: Connection, Command, Data.

Chapter 3 Introduction to ADO. NET Data Provider contains four classes: Connection, Command, Data. Adapter and Data. Reader. These four classes can be used to perform the different functionalities to help you to: n n Set a connection between your project and the data source using the Connection object Execute data queries to retrieve, manipulate and update data using the Command object Move the data between your Data. Set and your database using the Data. Adapter object Perform data queries from the database (read-only) using the Data. Reader object 12/22/2021 5

Chapter 3 Introduction to ADO. NET n n n The Data. Set class can

Chapter 3 Introduction to ADO. NET n n n The Data. Set class can be considered as a table container and it can contain multiple data tables. These data tables are only a mapping to those real data tables in your database. But these data tables can also be used separately without connecting to the Data. Set. In this case, each data table can be considered as a Data. Table object. The Data. Set and Data. Table classes have no direct relationship with the Data Provider class; therefore they are often called Data Provider-independent components. Four classes such as Connection, Command, Data. Adapter and Data. Reader that belong to Data Provider is often called Data Provider-dependent components. 12/22/2021 6

3. 3 The Architecture of ADO. NET The ADO. NET architecture can be divided

3. 3 The Architecture of ADO. NET The ADO. NET architecture can be divided into two logical pieces: command execution and caching. n n Command execution requires features like connectivity, execution, and reading of results. These features are enabled with ADO. NET Data Providers. Caching of results is handled by the Data. Set. 12/22/2021 7

The Architecture of the ADO. NET 12/22/2021 8

The Architecture of the ADO. NET 12/22/2021 8

The Architecture of the ADO. NET - 2 12/22/2021 9

The Architecture of the ADO. NET - 2 12/22/2021 9

3. 4 The Components of ADO. NET 3. 4. 1 The Data Provider can

3. 4 The Components of ADO. NET 3. 4. 1 The Data Provider can also be called a data driver and it can be used as a major component for your data-driven applications. The functionalities of the Data Provider, as its name means, are to: n n n Connect your data source with your applications Execute different methods to perform the associated data query and data accessing operations between your data source and your applications Disconnect the data source when the data operations are done 12/22/2021 10

3. 4. 1 The Data Provider is physically composed of a binary library file

3. 4. 1 The Data Provider is physically composed of a binary library file and this library is in the DLL file format. Sometimes this DLL file depends on other DLL files, so in fact a Data Provider can be made up of several DLL files. Based on the different kinds of databases, Data Provider can have several versions and each version is matched to each kind of database. The popular versions of the Data Provider are: n n Open Data. Base Connectivity (Odbc) Data Provider (ODBC. NET) Object Linking and Embeding Data. Base (Ole. Db) Data Provider (OLEDB. NET) SQL Server (Sql) Data Provider (SQL Server. NET) Oracle (Oracle) Data Provider (Oracle. NET) 12/22/2021 11

3. 4. 1 The Data Provider The different data providers are located at the

3. 4. 1 The Data Provider The different data providers are located at the different namespaces, and these namespaces hold the various data classes that you must import into your code in order to use those classes in your project. Table 3 -1 lists the most popular namespaces used by the different data providers and used by the Data. Set and the Data. Table. 12/22/2021 12

3. 4. 1. 1 The ODBC Data Provider The. NET Framework Data Provider for

3. 4. 1. 1 The ODBC Data Provider The. NET Framework Data Provider for ODBC uses native ODBC Driver Manager (DM) through COM interlope to enable data access. The ODBC. NET data provider provides access to ODBC data sources with the help of native ODBC drivers in the same way that the Ole. Db. NET data provider accesses native OLE DB providers. The ODBC. NET supports the following Data Providers: n n n SQL Server Microsoft ODBC for Oracle Microsoft Access Driver (*. mdb) 12/22/2021 13

3. 4. 1. 2 The OLEDB Data Provider The System. Data. Ole. Db namespace

3. 4. 1. 2 The OLEDB Data Provider The System. Data. Ole. Db namespace holds all classes used by the. NET Framework Data Provider for OLE DB. The. NET Framework Data Provider for OLE DB describes a collection of classes used to access an OLE DB data source in the managed space. The OLE DB. NET data access technique supports the following Data Providers: n n n Microsoft Access SQL Server (7. 0 or later) Oracle (9 i or later) 12/22/2021 14

3. 4. 1. 3 The SQL Server Data Provider This Data Provider provides access

3. 4. 1. 3 The SQL Server Data Provider This Data Provider provides access to a SQL Server version 7. 0 or later database using its own internal protocol. The functionality of the data provider is designed to be similar to that of the. NET Framework data providers for OLE DB, ODBC, and Oracle. All classes related to this Data Provider are defined in a DLL file and is located at the System. Data. Sql. Client namespace. Although Microsoft provides different Data Providers to access the data in SQL Server database, such as the ODBC and OLE DB, for the sake of optimal data operations, it is highly recommended to use this Data Provider to access the data in an SQL Server data source. 12/22/2021 15

3. 4. 1. 4 The Oracle Data Provider This Data Provider is an add-on

3. 4. 1. 4 The Oracle Data Provider This Data Provider is an add-on component to the. NET Framework that provides access to the Oracle database. All classes related to this Data Provider are located in the System. Data. Oracle. Client namespace. This provider relies upon Oracle Client Interfaces provided by the Oracle Client Software. You need to install the Oracle Client software on your computer to use this Data Provider. Microsoft provides multiple ways to access the data stored in an Oracle database, such as Microsoft ODBC for Oracle and OLE DB, you should use this Data Provider to access the data in an Oracle data source since this one provides the most efficient way to access the Oracle database. 12/22/2021 16

3. 4. 2 The Connection Class Data Provider contains four sub-classes and the Connection

3. 4. 2 The Connection Class Data Provider contains four sub-classes and the Connection component is one of them. This class provides a connection between your applications and the database you selected to connect to your project. To use this class to setup a connection between your application and the desired database, you need first to create an instance or an object based on this class. The Connection object you want to use depends on the type of the data source you selected. Data Provider provides four different Connection classes and each one is matched to one different database. 12/22/2021 17

3. 4. 2 The Connection Class Table 3 -3 lists these popular Connection classes

3. 4. 2 The Connection Class Table 3 -3 lists these popular Connection classes used for the different data sources: 12/22/2021 18

3. 4. 2 The Connection Class The connection string is a property of the

3. 4. 2 The Connection Class The connection string is a property of the Connection class and it provides all necessary information to connect to your data source. Regularly this connection string contains a quite few parameters to define a connection, but only five of them are popularly utilized for most data-driven applications: n n n Provider Data Source Database User ID Password 12/22/2021 19

3. 4. 2 The Connection Class A typical data connection instance with a general

3. 4. 2 The Connection Class A typical data connection instance with a general connection string can be expressed by the following codes: Connection = New xxx. Connection(“Provider = My. Provider; ” & _ “Data Source = My. Server; ” & _ “Database = My. Database; ” & _ “User ID = My. User. ID; ” & _ “Password = My. Pass. Word; ”) where xxx should be replaced by the selected Data Provider in your real application, such as Ole. Db, Sql or Oracle. You need to use the real parameter values implemented in your applications to replace those nominal values such as My. Server, My. Database, My. User. ID and My. Pass. Word in your application. 12/22/2021 20

3. 4. 2 The Connection Class The Provider parameter indicates the database driver you

3. 4. 2 The Connection Class The Provider parameter indicates the database driver you selected. If you installed a local SQL server and client such as the SQL Server 2005 Express on your computer, the Provider should be localhost. If you are using a remote SQL Server instance, you need to use that remote server’s network name. If you are using the default named instance of SQLX on your computer, you need to use. SQLEXPRESS as the value for your Provider parameter. For the Oracle server database, you do not need to use this parameter. The Data Source parameter indicates the name of the network computer on which your SQL server or Oracle server is installed and running. The Database parameter indicates your database name. The User ID and Password parameters are used for the security issue for your database. In most cases, the default Windows NT Security Authentication is utilized. 12/22/2021 21

3. 4. 2 The Connection Class Some typical Connection instances are listed below: OLE

3. 4. 2 The Connection Class Some typical Connection instances are listed below: OLE DB Data Provider for Microsoft Access Database Connection = New Ole. Db. Connection("Provider=Microsoft. Jet. OLEDB. 4. 0; " & _ "Data Source=C: databaseCSE_DEPT. mdb; " & _ "User ID=My. User. ID; " & _ "Password=My. Pass. Word; ") SQL Server Data Provider for SQL Server Database Connection = New Sql. Connection("Server=localhost; " + _ "Data Source=SusanSQLEXPRESS; " + _ "Database=CSE_DEPT; " + _ "Integrated Security=SSPI") Oracle Data Provider for Oracle Database Connection = New Oracle. Connection("Data Source=XE; " + _ "User ID=system; " + _ 12/22/2021 "Password=reback") 22

3. 4. 2. 1 The Open() Method of the Connection Class To create a

3. 4. 2. 1 The Open() Method of the Connection Class To create a real connection between your database and your applications, the Open() method of the Connection class is called and it is used to open a connection to a data source with the property settings specified by the connection string. An example of opening an OLEDB connection is shown in Figure 3 -3. 12/22/2021 23

3. 4. 2. 2 The Close() Method of the Connection Class The Close() method

3. 4. 2. 2 The Close() Method of the Connection Class The Close() method is a partner of the Open() method and it is used to close a connection between your database and your applications when you finished your data operations to the data source. You should close any connection object you connected to your data source after you finished the data access to that data source, otherwise a possible error may be encountered when you try reopen that connection in the next time as you run your project. Unlike the Open() method, which is a key to your data access and operation to your data source, the Close() method does not throw any exceptions when you try to close a connection that has already been closed. So you do not need to use a Try…. Catch block to catch any error for this method. 12/22/2021 24

3. 4. 2. 3 The Dispose() Method of the Connection Class The Dispose() method

3. 4. 2. 3 The Dispose() Method of the Connection Class The Dispose() method of the Connection class is an overloaded method and it is used to releases the resources used by the Connection object. You need to call this method after the Close() method is executed to perform a cleanup job to release all resources used by the Connection object during your data access and operations to your data source. After the Close() and Dispose() methods executed, you can release your reference to the Connection instance by setting it to Nothing. A piece of example code is shown in Figure 3 -4. 12/22/2021 25

3. 4. 3 The Command the Parameter Classes Command objects are used to execute

3. 4. 3 The Command the Parameter Classes Command objects are used to execute commands against your database such as a data query, an action query, and even a stored procedure. In fact, all data accesses and data operations between your data source and your applications are achieved by executing the Command object with a set of parameters. Command class can be divided into the different categories and these categories are based on the different Data Providers. For the popular Data Providers, such as OLE DB, ODBC, SQL Server and Oracle, each one has its own Command class. Each Command class is identified by the different prefix such as Ole. Db. Command, Odbc. Command, Sql. Command Oracle. Command. Although these different Command objects belong to the different Data Providers, they have the similar properties and methods, and they are equivalent in functionalities. 12/22/2021 26

3. 4. 3 The Command the Parameter Classes Depends on the architecture of the

3. 4. 3 The Command the Parameter Classes Depends on the architecture of the ADO. NET, the Command object can have two different roles. Refer to Figures 3 -1 and 3 -2 in this chapter. In Figure 3 -1, if a Table. Adapter is utilized to perform a data query and all data tables are embedded into the Data. Set as a data catching unit, the Command object is embedded into the different data query method of the Table. Adapter, such as Select. Command, Insert. Command, Update. Command Delete. Command is executed based on the associated query type. In this case, the Command object can be executed indirectly, which means that you do not need to use any Executing method to run the Command object directly, instead you can run it by executing the associated method of the Table. Adapter. In Figure 3 -2, each data table can be considered as an individual table. The Command object can be executed directly based on the attached parameter collection that is created and initialized by the user. 12/22/2021 27

3. 4. 3. 1 The Properties of the Command Class The Command class contains

3. 4. 3. 1 The Properties of the Command Class The Command class contains more than 10 properties, but only four of them are used popularly in most applications: n n Connection property Command. Type property Command. Text property Parameters property 12/22/2021 28

3. 4. 3. 1 The Properties of the Command Class n Connection property holds

3. 4. 3. 1 The Properties of the Command Class n Connection property holds a valid Connection object, and the Command object can be executed to access the connected databased on this Connection object. n Command. Type property indicates what kind of command that is stored in the Command. Text property should be executed. n Command. Text property contains a complete SQL statement if the value of the Command. Type property is Text. n Parameters property holds a collection of the Parameter objects. You must first create and initialize a Parameter object before you can add that object to the Parameters collection for a Command object. 12/22/2021 29

3. 4. 3. 2 The Constructors and Properties of the Parameter Class The Parameter

3. 4. 3. 2 The Constructors and Properties of the Parameter Class The Parameter class has four popular constructors, which are shown in Figure 3 -5 (an SQL Server Data Provider is used as an example). Dim sql. Parameter As 12/22/2021 New New Sql. Parameter() Sql. Parameter(Param. Name, obj. Value) Sql. Parameter(Param. Name, sql. Db. Type, int. Size) 30

3. 4. 3. 3 Parameter Mapping When you add a Parameter object to the

3. 4. 3. 3 Parameter Mapping When you add a Parameter object to the Parameters collection of a Command object, the Command object needs to know the relationship between that added parameter and the parameters you used in your SQL query string. Different parameter mappings are used for different Data Providers. Table 3 -5 lists these mappings. 12/22/2021 31

3. 4. 3. 3 Parameter Mapping Both OLE DB and ODBC Data Providers used

3. 4. 3. 3 Parameter Mapping Both OLE DB and ODBC Data Providers used a so-called Positional Parameter Mapping, which means that the relationship between the parameters defined in an SQL statement and the added parameters into a Parameters collection is one-to-one in the order. In other words, the order in which the parameters appear in an SQL statement and the order in which the parameters are added into the Parameters collection should be exactly identical. The Positional Parameter Mapping is indicated with a question mark ? . Both SQL Server and Oracle Data Provider used the Named Parameter Mapping, which means that each parameter, either defined in an SQL statement or added into a Parameters collection, is identified by the name. In other words, the name of the parameter appeared in an SQL statement or a stored procedure must be identical with the name of the parameter you added into a Parameters collection. 12/22/2021 32

3. 4 The Methods of the Parameter. Collection Class To add Parameter objects to

3. 4 The Methods of the Parameter. Collection Class To add Parameter objects to an Parameters collection of a Command object, two popular ways are generally adopted, Add() method and Add. With. Value() method. The Add() method is an overloaded method and it has five different protocols, but only two of them are widely used. The protocols of these two methods are shown below. Parameter. Collection. Add( value As Sql. Parameter ) As Sql. Parameter. Collection. Add( param. Name As String, Value As Object ) The Add. With. Value() method is similar to the second Add() method with the following protocol: Parameter. Collection. Add. With. Value( param. Name As String, Value As Object ) 12/22/2021 33

3. 4. 3. 5 The Constructor of the Command Class The constructor of the

3. 4. 3. 5 The Constructor of the Command Class The constructor of the Command class is an overloaded method and it has multiple protocols. Four popular protocols are listed in Figure 3 -8 (an SQL Server Data Provider is used as an example). 12/22/2021 34

3. 4. 3. 6 The Methods of the Command Class The actual execution of

3. 4. 3. 6 The Methods of the Command Class The actual execution of a Command object is to run one of methods of the Command class to perform the associated data queries or data actions. Four popular methods are widely utilized for most data-driven applications and Table 3 -6 lists these methods. 12/22/2021 35

3. 4. 4 The Data. Adapter Class The Data. Adapter serves as a bridge

3. 4. 4 The Data. Adapter Class The Data. Adapter serves as a bridge between a Data. Set and a data source for retrieving and saving data. The Data. Adapter provides this bridge by mapping Fill, which changes the data in the Data. Set to match the data in the data source, and Update, which changes the data in the data source to match the data in the Data. Set. The Data. Adapter connects to your database using a Connection object and it uses Command objects to retrieve data from the database and populate those data to the Data. Set and related classes such as Data. Tables, also the Data. Adapter uses Command objects to send data from your Data. Set to your database. 12/22/2021 36

3. 4. 4 The Data. Adapter Class To perform data query from your database

3. 4. 4 The Data. Adapter Class To perform data query from your database to the Data. Set, the Data. Adapter uses the suitable Command objects and assign them to the appropriate Data. Adapter properties such as Select. Command, and execute that Command. To perform other data manipulations, the Data. Adapter uses the same Command objects but assign them with different properties such as Insert. Command, Update. Command Delete. Command to complete the associated data operations. The Data. Adapter is a Data Provider-dependent component. This means that the Data. Adapter has different versions based on the used Data Provider. 12/22/2021 37

3. 4. 4. 3 The Methods of the Data. Adapter Class The Data. Adapter

3. 4. 4. 3 The Methods of the Data. Adapter Class The Data. Adapter has more than 10 methods available. Table 3 -9 lists some most often used methods. Among these methods, the Dispose, Fill. Schema and Update are most often used methods. 12/22/2021 38

An Example the Fill Method of the Data. Adapter Class 12/22/2021 39

An Example the Fill Method of the Data. Adapter Class 12/22/2021 39

3. 4. 5 The Data. Reader Class The Data. Reader class is a read-only

3. 4. 5 The Data. Reader Class The Data. Reader class is a read-only class and it can only be used to retrieve and hold the data rows returned from a database executing an Execute. Reader method. This class provides a way of reading a forward-only stream of rows from a database. Depends on the Data Provider you are using, four popular Data. Readers are provided by four Data Providers. They are Odbc. Data. Reader, Ole. Db. Data. Reader, Sql. Data. Reader and Oracle. Data. Reader. To create a Data. Reader instance, you must call the Execute. Reader method of the Command object, instead of directly using a constructor since the Data. Reader class does not have any public constructor. 12/22/2021 40

The Properties of the Data. Reader Class Table 3 -11 lists most public properties

The Properties of the Data. Reader Class Table 3 -11 lists most public properties of the Sql. Data. Reader class. All other Data. Reader classes have the similar properties. 12/22/2021 41

The Methods of the Data. Reader Class The Data. Reader class has more than

The Methods of the Data. Reader Class The Data. Reader class has more than 50 public methods. Table 3 -12 lists the most useful methods of the Sql. Data. Reader class. All other Data. Reader classes have the similar methods. 12/22/2021 42

An Example of the Data. Reader Class 12/22/2021 43

An Example of the Data. Reader Class 12/22/2021 43

3. 4. 6 The Data. Set Component The Data. Set, which is an in-memory

3. 4. 6 The Data. Set Component The Data. Set, which is an in-memory cache of data retrieved from a database, is a major component of the ADO. NET architecture. The Data. Set consists of a collection of Data. Table objects that you can relate to each other with Data. Relation objects. In other words, a Data. Set object can be considered as a table-container that contains a set of data tables with the Data. Relation as a bridge to relate all tables together. n n A Data. Set class holds a data table collection, which contains a set of data tables or Data. Table objects, and the Relations collection, which contains a set of Data. Relation objects. A Data. Table class holds the Rows collection, which contains a set of data rows or Data. Row objects, and the Columns collection, which contains a set of data columns or Data. Column objects. 12/22/2021 44

3. 4. 6 The Data. Set Component - 2 The definition of the Data.

3. 4. 6 The Data. Set Component - 2 The definition of the Data. Set class is a generic idea, which means that it is not tied to any specific type of database. Data can be loaded into a Data. Set by using a Table. Adapter from many different databases such as Microsoft Access, Microsoft SQL Server, Oracle, Microsoft Exchange, Microsoft Active Directory, or any OLE DB or ODBC compliant database. Although not tied to any specific database, the Data. Set class is designed to contain relational tabular data as one would find in a relational database. 12/22/2021 45

The Data. Set Component and other Data Objects Figure 3 -15 shows a global

The Data. Set Component and other Data Objects Figure 3 -15 shows a global relationship between the Data. Set object, other data objects and the Visual Basic 2005 application. 12/22/2021 46

An Example of The Data. Set Component 12/22/2021 47

An Example of The Data. Set Component 12/22/2021 47

3. 4. 7 The Data. Table Component Data. Table class can be considered as

3. 4. 7 The Data. Table Component Data. Table class can be considered as a container that holds the Rows and Columns collections, and the Rows and Columns collections contain a set of rows (or Data. Row objects) and a set of columns (or Data. Column objects) from a data table in a database. The Data. Table is a directly mapping to a real data table in a database or a data source and it store its data in a mapping area, or a block of memory space that is associated to a data table in a database as your project runs. The Data. Table class is located in the System. Data namespace and it is a Data Provider independent component, which means that only one set of Data. Table objects are existed no matter what kind of Data Provider you are using in your applications. 12/22/2021 48

3. 4. 7 The Data. Table Component - 2 When accessing Data. Table objects,

3. 4. 7 The Data. Table Component - 2 When accessing Data. Table objects, note that they are conditionally case sensitive. For example, if one Data. Table is named "faculty" and another is named "Faculty", a string used to search for one of the tables is regarded as case sensitive. However, if "faculty" exists and "Faculty" does not, the search string is regarded as case insensitive. A Data. Set can contain two Data. Table objects that have the same Table. Name property value but different Namespace property values. If you are creating a Data. Table programmatically, you must first define its schema by adding Data. Column objects to the Data. Column. Collection (accessed through the Columns property). To add rows to a Data. Table, you must first use the New. Row method to return a new Data. Row object. 12/22/2021 49

3. 4. 7. 1 The Data. Table Constructor The Data. Table has four overloaded

3. 4. 7. 1 The Data. Table Constructor The Data. Table has four overloaded constructors and Table 3 -18 lists three most often used constructors. 12/22/2021 50

An Example of The Data. Table 12/22/2021 51

An Example of The Data. Table 12/22/2021 51

3. 5 Chapter Summary The main topic of this chapter is an introduction to

3. 5 Chapter Summary The main topic of this chapter is an introduction to the ADO. NET, which includes the architectures, organizations and components of the ADO. NET. Fundamentally the ADO. NET is a class container and it contains three basic components: Data Provider, Data. Set and Data. Table. Furthermore, the Data Provider contains four sub-components: Connection, Command, Table. Adapter and Data. Reader. All four sub-components of the Data Provider are called Data Providerdependent components. The popular versions of the Data Provider are: OLE DB Data Provider ODBC Data Provider Microsoft SQL Server Data Provider Oracle Data Provider 12/22/2021 52

3. 5 Chapter Summary - 2 By finishing this chapter, you should be able

3. 5 Chapter Summary - 2 By finishing this chapter, you should be able to: n n n n Understand the architecture and organization of the ADO. NET Understand three components of the ADO. NET, such as the Data Provider, Data. Set and the Data. Table Use the Connection object to connect to an Microsoft Access, Microsoft SQL Server and Oracle database Use the Command Parameter objects to select, insert and delete data using a string variable containing a SQL statement Use the Data. Adapter object to fill a Data. Set using the Fill method Read data from the data source using the Data. Reader object Read data from the Data. Table using the Select. Command property of the Data. Adapter object Create Data. Set and Data. Table objects and add data into the Data. Table object 12/22/2021 53

Homework n n n True/False Questions: Multiple Choices: Exercises: 12/22/2021 54

Homework n n n True/False Questions: Multiple Choices: Exercises: 12/22/2021 54

Questions and Answers…… 12/22/2021 55

Questions and Answers…… 12/22/2021 55