How to acquire fields origin from TSQLQuery

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
jikulis
Posts: 2
Joined: Fri 10 Jan 2014 15:41

How to acquire fields origin from TSQLQuery

Post by 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.

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: How to acquire fields origin from TSQLQuery

Post by 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.

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

Re: How to acquire fields origin from TSQLQuery

Post by 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.

Post Reply