ch11lev1sec2

   

Component Overview

The following list describes each of the ADOExpress components found on the ADO tab of the Component Palette. It is important to learn about the components in an order that makes sense. In this case, we will cover the components in an order that both eases your transition from the BDE components (by showing the similar components in ADOExpress first), and which also reflects the dependencies between the components . Thus, we will first cover the TADOConnection component (used by all other ADO components), followed by TADOTable and TADOQuery (both similar to their BDE counterparts TTable and TQuery ), and only then will we move on to the more unusual components, such as TADODataSet and TADOCommand .

  • TADOConnection Connects to the database, manages transactions; it is essentially equivalent to TDatabase . Note that there is no TSession equivalent for the ADO components. Some TSession capabilities are present in TADOConnection .

  • TRDSConnection Connects to a database in such a way that allows multitier access to an ADO recordset. Only usable with TADODataSet ; supports the Microsoft Remote Data Space facility, which enables an ADO recordset to be passed across tiers of a multitier database application. Note that this is not the same as MIDAS support for Remote Data Modules.

  • TADOTable Accesses a single database table name by table name ; essentially equivalent to TTable .

  • TADOQuery Accesses one or more tables in a single database using SQL commands. Can perform any SQL including SELECT , INSERT , DELETE , ALTER TABLE , and so on; essentially equivalent to TQuery .

  • TADOStoredProc Executes a stored procedure from a particular database; essentially equivalent to TstoredProc .

  • TADODataSet Essentially the same as TADOQuery , except that you cannot execute SQL that does not return a result set.

  • TADOCommand Essentially the same as TADOQuery . You can execute any SQL with TADOCommand , but to access the resultset, you need to provide a separate TADODataset that will be connected to the command's result set.

How Do They Fit into the VCL?

The inheritance of the ADO components is rooted in TDataSet . However, the immediate descendant of TDataSet is not TADODataSet , which you might expect to provide the root of the rest of the ADO components; instead, the hierarchy has the form shown in Figure 11.1.

Figure 11.1. The ADO component class hierarchy.

graphics/11fig01.gif


   
Top


C++ Builder Developers Guide
C++Builder 5 Developers Guide
ISBN: 0672319721
EAN: 2147483647
Year: 2002
Pages: 253

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net