DefaultExpression not working with all fields

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DDlopez
Posts: 8
Joined: Tue 25 Aug 2020 06:47

DefaultExpression not working with all fields

Post by DDlopez » Wed 24 Nov 2021 13:19

Hi you all,

We were using ODAC version 6.25 on Delphi 2006 . We purchased the latest version of ODAC 11.2.5 and we have migrated all our clients with little problem and now they are all working fine after a bit of fine-tuning.

But we have a problem that has struck us just now, related to DefaultExpression.

The problem is that we have one form (for now) where DefaultExpression only works in some fields, but not in all fields and when I insert a new record some of the fields that have DefaultExpression with values are empty (null) but the others work just fine.

We've compiled the project with ODAC version 6.25 and the problem is gone, so I assume that there is some kind of problem or configuration that I'm not aware of.

Can you help me?

Thanks in advance.

DDlopez
Posts: 8
Joined: Tue 25 Aug 2020 06:47

Re: DefaultExpression not working with all fields

Post by DDlopez » Thu 25 Nov 2021 12:25

Ok, I've been doing some testing and I think I narrowed the problem.

The property DefaultValues is True in the TOraquery where I'm having problems.

I tried changing to false, but now some fields are null because they don't have DefaultExpression nor Default Value in DB.

Is there a param to force the old behavior? Usually, you have one.

Thanks in advance.

Post Reply