从收集数据收集"ADOTable"中的数据到 TXT 访问

collecting data fromcollect data in the "ADOTable" into txt access

本文关键字:数据 TXT 访问 ADOTable      更新时间:2023-10-16

我用C ++ Builder XEms access 2010创建应用程序。

作者: ADOConnection> ADOTable> DataSource> DBGrid .

如何收集DBGrid中显示的数据。我知道使用以下代码:

AnsiString tmpText;
tmpText+=ADOTable2->FieldByName("Name")->AsString;

但无法获取DBGrid中的所有数据

例如:

ADOTable1->First(); // go to first record
for(int i = 0; i < ADOTable1->RecordCount; i++){
    // read all columns needed by using ADOTable1->FieldByName("FieldName")->As..
    ADOTable1->Next(); // go to next record
}