UniTable and calculated fields

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
testpresta
Posts: 32
Joined: Sat 07 Jun 2014 19:41

UniTable and calculated fields

Post by testpresta » Fri 20 Jun 2014 08:38

Hello

I am reading in a UniTable component.
I have some calculated fields (defined in Delphi 7 Object Tree View).

When i am setting a value to a calculated field, i get an error saying to me i need to be in edit or insert mode.
But the fields i manipulate are note in database.
Is there a way to bypass the error message ?

Thanks

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

Re: UniTable and calculated fields

Post by AlexP » Fri 20 Jun 2014 09:27

Hello,

This calculated field (as well as all the fields) is "attached" to the DataSet, and to edit any field, the DataSet must be in the dsEdit mode (is set after calling the Edit method). Moreover, if you modify the value of this field, then after calling the Post method the value will be replaced with the one specified in the onCalcFields event.

Post Reply