Automatically fill DefaultExpression when creating fields

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Automatically fill DefaultExpression when creating fields

Post by a-s-z » Wed 21 Jul 2010 10:14

Hello,

is it possible to fill the DefaultExpression property of persistent fields, when adding them with the designer or creating a field at runtime?
I can do this partially at runtime using user_tab_columns, but integrating such a feature in odac would be a great enhancement!

Or is this already possible and I did not not find this functionality yet?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Fri 23 Jul 2010 11:13

Hello

You should set the Options.DefaultValues option of your dataset to True and the DefaultExpression property of persistent fields will be filled automatically.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Post by a-s-z » Tue 27 Jul 2010 09:25

Hello bork,
bork wrote:Hello
You should set the Options.DefaultValues option of your dataset to True and the DefaultExpression property of persistent fields will be filled automatically.
I did set Options.DefaultValues and created persistent fields afterwards. Is DefaultExpression property filled at runtime? I do not see any value in the object inspector.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 27 Jul 2010 11:03

Hello

Please provide us the exact ODAC version that you are using (for example 6.90.0.59).

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Post by a-s-z » Thu 29 Jul 2010 10:18

Hi bork,
bork wrote:Hello
Please provide us the exact ODAC version that you are using (for example 6.90.0.59).
running a compiled program yields:
DACVersion = '6.90.0.60';
OdacVersion = '6.90.0.56';

Using "About ODAC" yields "6.90.0.56 for RAD Studio 2009"
Using "About Unidac" yields "3.00.0.7 for RAD Studio 2009"

BTW: Is it possible to provide functions in Ora.pas, that return the OdacVersion and DacVersion, instead of using constants? When using packages, the "reported" version will differ from actual version since the compiler will "resolve" the constant at compile time!

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 30 Jul 2010 12:27

Please try to Open a query in design time and then create persistent fields.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Post by a-s-z » Mon 02 Aug 2010 11:01

Hi Challenger,
Challenger wrote:Please try to Open a query in design time and then create persistent fields.
Thats it! If the query is open at the time when the persistent fields get created, then default expression is filled in. If I choose to create all fields in design time with query.active = false, defaultexpression is not filled in.

Is this the intended behavior, or is it a bug in design time? In my opinion the DefaultExpression should get filled in, regardless of the Active-State of the query in design time.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 02 Aug 2010 15:03

Hello

No, it is not a bug. We will investigate the possibility of filling default expression for inactive dataset in one of the next builds/versions of ODAC.

a-s-z
Posts: 106
Joined: Wed 03 Dec 2008 06:01

Post by a-s-z » Mon 02 Aug 2010 15:30

Hi Bork,
bork wrote:Hello

No, it is not a bug. We will investigate the possibility of filling default expression for inactive dataset in one of the next builds/versions of ODAC.
If it is not a bug, what is the purpose of this behavior?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 03 Aug 2010 10:50

Hello

Part of the information about a field is available after opening the server cursor only. Therefore we get the information about the default field value after server cursor is open (after you call the Open method). Now we are investigating the possibility of filling default field values before it. If it is possible we will implement it certainly.

alex.santanna
Posts: 4
Joined: Fri 23 Jan 2009 20:05

News

Post by alex.santanna » Mon 11 Jul 2011 21:30

Hello Bork any news about this investigation?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 09 Sep 2011 10:20

Hello,

Sorry for the delay. We have implemented this feature. The delay was due to the fact that after implementing this feature we had some problems with performance that needed fixing. This feature will be available in the next version of ODAC to be released next week.

Post Reply