I create applications with C ++ Builder XE
and ms access 2010
.
by: ADOConnection
> ADOTable
> DataSource
> DBGrid
.
how to collect the data that appear in the DBGrid
.
I know use this code:
AnsiString tmpText;
tmpText+=ADOTable2->FieldByName("Name")->AsString;
but could not take all of the data that is in DBGrid
For example:
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
}