请问各位大狭---query控件的使用方法 谢谢

解决方案 »

  1.   

    看帮助不久行了。
    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;
      

  2.   

    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