Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread TField and Query
Tue, Jun 23 2009 4:10 AMPermanent Link

Dario B
Hi,
  I'm using a TEDBQuery with SQL like this: "select tblA.*, tblB.field as MyField from tblA join tblB on tblA.ID = tblB.ID order by MyField"

The query works fine but I need to add TField at design time to evaluate a calc field with a result of an external function (a automatic barcode for
example).

But I have this problem:
if I add TFields I can't access to MyField; If I remove Tfields I can't evaluate my calc field...

What's the solution that I don't find?? ^^

Thanks

Dario
Thu, Jun 25 2009 6:28 AMPermanent Link

Dario B
No idea?? ^^

Dario B wrote:

Hi,
  I'm using a TEDBQuery with SQL like this: "select tblA.*, tblB.field as MyField from tblA join tblB on tblA.ID = tblB.ID order by MyField"

The query works fine but I need to add TField at design time to evaluate a calc field with a result of an external function (a automatic barcode for
example).

But I have this problem:
if I add TFields I can't access to MyField; If I remove Tfields I can't evaluate my calc field...

What's the solution that I don't find?? ^^

Thanks

Dario
Thu, Jun 25 2009 6:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dario


Saying you're adding TFields are you saying that you've added some persistent fields to the query or something else?

If that is what you're saying have you tried adding MyField to the field list?

Roy Lambert [Team Elevate]
Fri, Jun 26 2009 12:13 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dario,

<< But I have this problem:
if I add TFields I can't access to MyField; If I remove Tfields I can't
evaluate my calc field... >>

Could you please elaborate on how you're creating the persistent TFields,
and which TFields are being created ?  Using the fields editor, adding all
of the dataset fields automatically should result in the necessary
persistent TFields being created.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 3 2009 3:12 AMPermanent Link

Dario B
I have understood!

If I write my SQL query in my TEDBxQuery I can add the TFields at design time;
If I change SQL Query at runtime I have to create my fields by myself..

NOw I have understood and everything works fine Smile

thank you

Dario

"Tim Young [Elevate Software]" wrote:

Dario,

<< But I have this problem:
if I add TFields I can't access to MyField; If I remove Tfields I can't
evaluate my calc field... >>

Could you please elaborate on how you're creating the persistent TFields,
and which TFields are being created ?  Using the fields editor, adding all
of the dataset fields automatically should result in the necessary
persistent TFields being created.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image