Data.Win.ADODB.TCustomADODataSet.Recordset

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Recordset: _Recordset read FRecordsetObject write SetRecordset;

C++

__property Winapi::Adoint::_di__Recordset Recordset = {read=FRecordsetObject, write=SetRecordset};

Properties

Type Visibility Source Unit Parent
property public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Provides direct access to the ADO Recordset object.

Recordset is the interface through which the records of an ADO dataset are accessed. When you open an ADO dataset, the value of Recordset is automatically set to the interface that provides access to the records. This value should not be used until after an OnRecordsetCreate event occurs.

Use Recordset to get direct access to the ADO Recordset object the dataset component represents. This direct access reference allows an application to use properties and methods of the underlying Recordset object. Accessing the underlying Recordset object is especially useful for utilizing properties and methods of the Recordset object not surfaced in ADO dataset components.

Ordinarily, an application would seldom need to access the underlying Recordset object directly. One situation that would use such access is directing the Recordset produced by the execution of a TADOCommand component. In these situations, assign the Recordset returned by the Execute method (TADOCommand) directly to the Recordset property.


ADODataSet1.Recordset := ADOCommand1.Execute;
ADODataSet1->Recordset = ADOCommand1->Execute();

Note: Use of Recordset to directly access the underlying ADO Recordset object requires a good working knowledge of ADO objects in general and the ADO Recordset object in particular. Using Recordset is not recommended unless you are familiar with Recordset object operations. Consult the Microsoft Data Store SDK help for specific information on using Recordset objects.

See Also