[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Enumerator for TDataset records.
Source position: db.pas line 1994
type TDataSetEnumerator = class |
||
public |
||
constructor Create(); |
|
Create a new instance of the dataset enumerator. |
function MoveNext; |
|
Attempts to navigate to the next record. |
|
Current record. |
|
end; |
|
Enumerator for TDataset records. |
|
| | ||
TObject |
TDataSetEnumerator is an enumerator for the records in a dataset. It returns the TDataset.Fields instance. It navigates from the first till the last record in the dataset. The following is an example of how this can be used, in conjunction with the field enumerator:
var Rec : TFields; Fld : TField; begin orec in MyDataset do or in Rec do Writeln(F.Name,' : ',F.AsString);
Note that the current record pointer of the dataset is modified as the loop is traversed. If the current record is modified by other code while the loop is running, the result may become unpredictable. Similarly, if 2 enumerators are used simultaneously for the same dataset, the results are unpredictable.
|
Base class for records-based data-access. |
|
|
Collection of #fcl.db.TField instances. |
|
|
Default enumerator for the fields collection of a dataset. |