RAD Studio for Microsoft .NET
ContentsIndex
PreviousUpNext
ADO.NET Overview

ADO.NET is the .NET programming environment for building database applications based on native database formats or XML data. ADO.NET is designed as a back-end data store for all Microsoft .NET programming models, including Web Forms and Web Services. Use ADO.NET to manage data in the .NET Framework.

Note: BDP.NET is based on ADO.NET 1.1. AdoDbx Client is based on .NET 2.0.
CodeGear provides tools to simplify rapid ADO.NET development using AdoDbx Client and Borland Data Providers for .NET (BDP.NET). If you are familiar with rapid application development (RAD) and object oriented programming (OOP) using properties, methods, and events, you will find the ADO.NET model for building applications familiar. If you are a traditional database programmer, ADO.NET provides familiar concepts, such as tables, rows, and columns with relational navigation. XML developers will appreciate navigating the same data with nodes, parents, siblings, and children. 

This topic discusses the major components of the ADO.NET architecture, how ADO.NET integrates with other programming models in the .NET Framework, and key RAD Studio functionality to support ADO.NET. 

This topic introduces:

  • ADO.NET Architecture
  • ADO.NET User Interfaces
  • BDP.NET Namespace

 

ADO.NET Architecture 

The two major components of the ADO.NET architecture are the Data Provider and the DataSet. The data source represents the physical database or XML file, the Data Provider makes connections and passes commands, and the DataSet represents one or more data sources in memory. For more information about the general ADO.NET model, see the Microsoft .NET Framework SDK documentation.

Data Source

The data source is the physical database, either local or remote, or an XML file. In traditional database programming, the developer typically works with the data source directly, often requiring complex, proprietary interfaces. With ADO.NET, the database developer works with a set of components to access the data source, to expose data, and to pass commands.

Data Providers

Data Provider components connect to the physical databases or XML files, hiding implementation details. Providers can connect to one or more data sources, pass commands, and expose data to the DataSet. 

The .NET Framework includes providers for MS SQL, OLE DB, and Oracle. In addition to supporting the .NET providers, this product includes AdoDbx Client and BDP.NET. These connect to a number of industry standard databases, providing a consistent programming environment. For more information, see the Borland Data Providers for Microsoft .NET topic.

DataSet

The DataSet object represents in-memory tables and relations from one or more data sources. The DataSet provides a temporary work area or virtual scratch pad for manipulating data. ADO.NET applications manipulate tables in memory, not within the physical database. The DataSet provides additional flexibility over direct connections to physical databases. Much like a typical dataset object supported by many database systems, the DataSet can contain multiple DataTables, which are representations of tables or views from any number of data sources. The DataSet works in an asynchronous, non-connected mode, passing update commands through the Provider to the data source at a later time.  

RAD Studio provides two kinds of DataSets for your use: standard DataSets and typed DataSets. A standard DataSet is the default DataSet that you get when you define a DataSet object implicitly. This type of DataSet is constructed based on the layout of the columns in your data source, as they are returned at runtime based on your Select statement.  

Typed DataSets provide more control over the layout of the data you retrieve from a data source. A typed DataSet derives from a DataSet class. The typed DataSet lets you access tables and columns by name rather than collection methods. The typed DataSet feature provides better readability, improved code completion capabilities, and data type enforcement unavailable with standard DataSets. The compiler checks for type mismatches of typed DataSet elements at compile time rather than runtime. When you create a typed dataset, you see that some new objects are created for you and are accessible through the Project Manager. You will notice two files named after your dataset. One file is an XML .xsd file and the other is a code file in the language you are using. All of the data about your dataset, including the table and column data from the database connection, is stored in the .xsd file. The program code file is created based on the XML in the .xsd file. If you want to change the structure of the typed dataset, you can change items in the .xsd file. When you recompile, the program code file is regenerated based on the modified XML. 

For more information about DataSets, see the Microsoft .NET Framework SDK documentation.

ADO.NET provides data access for the various programming models in .NET.

Web Forms

Web Forms in ASP.NET provide a convenient interface for accessing databases over the web. ASP.NET uses ADO.NET to handle data access functions.  

.NET, AdoDbx Client and BDP.NET connection components ease integration between Web Forms and ADO.NET. DB Web Controls support both ADO.NET, AdoDbx Client and BDP.NET components, accelerating web application development.

Windows Forms

Windows Forms are no longer supported.

AdoDbx Client classes are found under the Borland.Data.AdoDbxClientProvider namespace.

BDP.NET classes are found under the Borland.Data namespaces.  

BDP.NET Namespace  

Namespace 
Description 
Borland.Data.Common  
Contains objects common to all Borland Data Providers, including Error and Exceptions classes, data type enumerations, provider options, and Interfaces for building your own Command, Connection, and Cursor classes.  
Borland.Data.Provider  
Contains key BDP.NET classes like BdpCommand, BdpConnection, BdpDataAdapter, and others that provide the means to interact with external data sources, such as Oracle, DB2, Interbase, and MS SQL Server databases.  
Borland.Data.Schema  
Contains Interfaces for building your own database schema manipulation classes, as well as a number of types and enumerators that define metadata.  
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!