TField.Origin - Problem

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tinof
Posts: 39
Joined: Fri 16 Dec 2005 07:41

TField.Origin - Problem

Post by tinof » Wed 05 Sep 2007 13:25

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 05 Sep 2007 14:40

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.

tinof
Posts: 39
Joined: Fri 16 Dec 2005 07:41

Post by tinof » Wed 05 Sep 2007 15:24

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 06 Sep 2007 08:36

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 07 Sep 2007 12:16

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.

tinof
Posts: 39
Joined: Fri 16 Dec 2005 07:41

Post by tinof » Wed 31 Mar 2010 06:11

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

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 31 Mar 2010 10:27

Please make sure that the TMSQuery.Options.FieldsOrigin property is set to True.

tinof
Posts: 39
Joined: Fri 16 Dec 2005 07:41

Post by tinof » Wed 31 Mar 2010 10:58

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

Post Reply