Page 1 of 1

TField.Origin - Problem

Posted: Wed 05 Sep 2007 13:25
by tinof
Hi,

i use SDAC 3.80.0.38, Delphi 2006, MSSQL - Server 2000.
I have a query like

Code: Select all

Select table1.field1, table2.field1 From table1,table2 ....
In the Origin- Property of the open TMSQuery - Fields i should find
"table1.field1" AND
"table2.field1"

But i get only "." (one dot wihthout Tablename or fieldname).

Am i wrong ? Or how can i get the origin - Fieldnames.

Thanks
Tino

Posted: Wed 05 Sep 2007 14:40
by Antaeus
I could not reproduce the problem.
Please send me a complete small sample at evgeniyD*crlab*com to demonstrate it, including script to create and fill tables.

Posted: Wed 05 Sep 2007 15:24
by tinof
Thanks for quick response !

Wow

tried to make a sample -> now all works fine ! ??
So what' the difference ??

Now I found it, i think here is the problem:

Set the 'readonly' - property of the query to 'true' -> no origin - values anymore.

Posted: Thu 06 Sep 2007 08:36
by Antaeus
Thank you for information. We have reproduced the problem. The investigation of the problem is in progress. As soon as we solve the problem we will let you know.

Posted: Fri 07 Sep 2007 12:16
by Antaeus
When you set the ReadOnly property value to True before opening a dataset, SDAC optimizes performance of the open operation. The optimization is that SDAC does not retrieve the metainformation from the server. There are two ways to avoid this problem:
- set the UniqueRecords option of the dataset to True before opening;
- set the ReadOnly property to True after the dataset has been opened, but not before.
However, in both cases open time will slightly slow down.

Posted: Wed 31 Mar 2010 06:11
by tinof
Hi,

sorry, but i'm here again.

I have updated from SDAC 4.70.0.48 to
SDAC 4.80.0.56

in Version 4.70.xxx TField.Origin returns the origin field name,
in 4.80.xxx it does not.

I have'nt made any other changes within my application, only the SDAC - update.

Is there a difference between theese 2 versions handling Tfield.Origin?
How can i fix it (the dataset is NOT read only)?

thank you, regards

Tino

Posted: Wed 31 Mar 2010 10:27
by Dimon
Please make sure that the TMSQuery.Options.FieldsOrigin property is set to True.

Posted: Wed 31 Mar 2010 10:58
by tinof
Thank you very much, that was the reason!

Please, tell in the history.html if you change default values for some properties.

Anyway, thank you for the quick help!

Regards
Tino