TOraQuery - Get actual field name from field alias

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dados
Posts: 82
Joined: Thu 18 Aug 2005 14:06

TOraQuery - Get actual field name from field alias

Post by dados » Tue 29 Sep 2009 11:32

Hi,

Is there any way to get actual field name from a select statement?

like:
select name as customer_name from customers
or
select name customer_name from customers

I've tried using this:
TDBAccessUtils.GetIRecordSet(vDataSet).Fields.Items[0].ActualName;
it returns customer_name
and
TDBAccessUtils.GetIRecordSet(vDataSet).Fields.Items[0].Name;
also return customer_name

Any ideas?

Reg, Arni Thor

dados
Posts: 82
Joined: Thu 18 Aug 2005 14:06

Resolved :)

Post by dados » Tue 29 Sep 2009 11:53

I found, later in the forum this solution:

vDataSet.GetFieldDesc('Field1').ActualName;

Post Reply