Get Field Names

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tudi_x
Posts: 15
Joined: Thu 09 Jul 2015 17:14
Location: Oklahoma

Get Field Names

Post by tudi_x » Tue 17 Nov 2015 07:23

Hi,
I am trying to get the names of all the fields in a VirtualTable, I am doing something like:

Code: Select all

for i := 0 to VirtualTable.FieldCount - 1 do 
begin
  field_names := field_names + ',' + VirtualTable.?[i]
end
Please advise how I can access the field name property.

Thank you

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Get Field Names

Post by AlexP » Tue 17 Nov 2015 08:07

hello,

Code: Select all

var
 i : Integer;
begin
  VirtualTable1.Open;
  for I := 0 to VirtualTable1.FieldCount - 1 do
    ShowMessage(VirtualTable1.Fields[i].FieldName);
end;

Post Reply