看帮助不久行了。 query.sql.clear; query.sql.add('select ....'); query.open; query.first; while not query.eof do begin textbox1.text:=query.fieldbyname('fieldName').asstring; ... end; query.close;
DescriptionUse TADOQuery to access one or more tables in a data store using SQL statements.Retrieve data from tables in an ADO data store using SELECT statements. Perform actions on tables and other metadata objects in an ADO data store with statements like INSERT, DELETE, UPDATE, ALTER TABLE, and CREATE TABLE. Execute stored procedures.属性: In TADOQueryDataSource RowsAffected SQLDerived from TCustomADODataSetBlockReadSize CacheSize CanModify CommandTimeout Connection ConnectionString CursorLocation CursorType DesignerData EnableBCD ExecuteOptions Filter FilteredFilterGroup IndexFieldCount IndexFields IndexName LockType MarshalOptions MaxRecords ParamCheck Parameters Prepared Properties RecNo RecordCount RecordsetRecordsetState RecordSize RecordStatus SortDerived from TDataSetActive AggFields AutoCalcFields Bof Book DataSetField DefaultFields Designer Eof FieldCount FieldDefList FieldDefs FieldList FieldsFieldValues FilterOptions Found IsUniDirectional Modified Name ObjectView SparseArrays StateDerived from TComponentComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo Owner Tag VCLComObject
query.sql.clear;
query.sql.add('select ....');
query.open;
query.first;
while not query.eof do
begin
textbox1.text:=query.fieldbyname('fieldName').asstring;
...
end;
query.close;
In TADOQueryDataSource
RowsAffected
SQLDerived from TCustomADODataSetBlockReadSize
CacheSize
CanModify
CommandTimeout
Connection
ConnectionString
CursorLocation
CursorType
DesignerData
EnableBCD
ExecuteOptions
Filter
FilteredFilterGroup
IndexFieldCount
IndexFields
IndexName
LockType
MarshalOptions
MaxRecords
ParamCheck
Parameters
Prepared
Properties
RecNo
RecordCount
RecordsetRecordsetState
RecordSize
RecordStatus
SortDerived from TDataSetActive
AggFields
AutoCalcFields
Bof
Book
DataSetField
DefaultFields
Designer
Eof
FieldCount
FieldDefList
FieldDefs
FieldList
FieldsFieldValues
FilterOptions
Found
IsUniDirectional
Modified
Name
ObjectView
SparseArrays
StateDerived from TComponentComObject
ComponentCount
ComponentIndex
Components
ComponentState
ComponentStyle
DesignInfo
Owner
Tag
VCLComObject