你既然知道使用GetTableName,干吗不知道使用GetFieldNames,以下
摘自Delphi帮助文件:
Populates a string list with the names of fields in a table.
Delphi syntax:
procedure GetFieldNames(const TableName: String;
List: TStrings);
C++ syntax:
void __fastcall GetFieldNames(const AnsiString TableName, Classes::TStrings* List);
Description
Call GetFieldNames to retrieve a list of fields in a table. The names of the fields are put into the already-existing string list object specified in the List parameter. Specify the table for which to retrieve the names of fields in the TableName property.
ADOConnection1.GetFieldNames('Employee', ListBox1.Items);
ADOConnection1->GetFieldNames("Employee", ListBox1->Items);