How to acquire fields origin from TSQLQuery

How to acquire fields origin from TSQLQuery

Postby jikulis » Fri 10 Jan 2014 16:16

Hello,

is there any suitable/reasonable/recommended way how to get information about fields origin from opened/prepared TSQLQuery? In case that SQL command joins data from two or more tables, moreover - when aliases are used for columns - how to detect real table/field name for every column in query?

There is Origin property inside of Db.TField class, but - if used with dbExpress dataset - it is always empty, with no value. Is this general behavior of dbExpress framework, dbExpress never care about origin of fields? Or is it driver-related issue?

TUniQuery component from UniDAC framework has Options.FieldsOrigin property (default FALSE). When set to TRUE, after opened/prepared, every field has non-empty value for its Origin property, formatted as TABLENAME.FIELDNAME. This is right behavior what Im looking for.

Thanks.
jikulis
 
Posts: 2
Joined: Fri 10 Jan 2014 15:41

Re: How to acquire fields origin from TSQLQuery

Postby ZEuS » Tue 14 Jan 2014 09:24

Unfortunately, there is no way to get information about a field origin in TSQLQuery, because it manages TField-s by itself. This is a specificity of the dbExpress technology, and we can not influence this behaviour. The default dbExpress driver for Firebird operates in the same way. You can write about this feature to the Embarcadero support.
ZEuS
Devart Team
 
Posts: 235
Joined: Thu 05 Apr 2012 07:32

Re: How to acquire fields origin from TSQLQuery

Postby jikulis » Tue 14 Jan 2014 13:37

Hello,

thanks for reply, I'd expect such conclusion. Im almost sure it has no sense to write anything to Embacadero support, especially anything related to something such "terrible outdated" as Delphi XE3.. Im not so young anymore to wait for response :D .

Ok, its right time to say goodbye to dbExpress and looks around for more sophisticated DAC library, like UniDAC or ZeosLib.
jikulis
 
Posts: 2
Joined: Fri 10 Jan 2014 15:41


Return to dbExpress driver for InterBase & Firebird