Get Field Names

Get Field Names

Postby 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
tudi_x
 
Posts: 15
Joined: Thu 09 Jul 2015 17:14
Location: Oklahoma

Re: Get Field Names

Postby 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;
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35


Return to VirtualDAC