Refresh and COMPUTED columns problem

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
costasd
Posts: 5
Joined: Fri 13 Jul 2018 11:44

Refresh and COMPUTED columns problem

Post by costasd » Wed 14 Apr 2021 17:58

I just discovered a serious problem with the behavior of TIBCQuery with Computed columns in Firebird.

1. When a refresh sql is not specified in the update sql's the refresh record statement generated by the component when you call RefreshRecord does NOT contain any COMPUTED BY columns.

2. The same behavior is also present when the DMLRefresh property is set to true. No Computed columns are specified in the RETURNING clause generated.

3. In the TIBCQuery propery editor, in the SQL Generator tab, no computed columns are retrieved from the dataset. I understand that this is done to avoid generating Insert or Update SQLs with Computed columns in them, but the refresh sql is also affected. One needs to be aware that there are extra columns and include them manually in the refresh statement.

As it is now, the only way to get a proper functionality when computed columns are present, is to manually specify the Refresh SQL missing columns and manually call RefreshRecord after each record insert or update.

This is a real show stopper I'm afraid, especially for those of us who migrated applications from other component suites, and needs to be addressed ASAP. In the property editor, the computed columns can be present, but not be highlighted and the user can choose to highlight them only for the generation of the Refresh SQL statement. I am sure some sort of convention can be found.

Post Reply