RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOConnection.GetFieldNames Method (WideString, TWideStrings)

Populates a string list with the names of fields in a table.

Pascal
procedure GetFieldNames(const TableName: WideString; List: TWideStrings); overload;
procedure GetFieldNames(const TableName: string; List: TStrings); overload;
C++
__fastcall GetFieldNames(const BSTR TableName, TWideStrings List);
__fastcall GetFieldNames(const AnsiString TableName, TStrings List);

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);

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!