Hi,
I have a SQL statement with 1 computed field on it. I assign values to all fields, no problem so far, but upon post I receive this error "Attempted update of read-only column". I was wondering why the IBCQuery includes the computed field in its update statement? Is there any way to solve this? Setting Options.SetFieldsReadOnly = False doesn't help.
Many thanks in advance !
Nico
Attempted update of read-only column
Re: Attempted update of read-only column
This error occurs when an UPDATE query contains a computed field. If the UPDATE query was generated in design-time, you should select all fields but computed and re-generate the UPDATE query. If the SQLUpdate property is set to empty string, the computed field will be added to the query only in case you manually assign a value to this field .To prevent the error, set the TField.ReadOnly property to True for this field.
-
NicoCallewaert
- Posts: 3
- Joined: Mon 18 Apr 2016 08:12
Re: Attempted update of read-only column
Hi Viktor,
Thanks for the reply. There was indeed a value assigned to the computed field. Fixed !
Thanks a lot, Nico
Thanks for the reply. There was indeed a value assigned to the computed field. Fixed !
Thanks a lot, Nico
Re: Attempted update of read-only column
It is good to see that the issue has been solved. Feel free to contact us if you have any further questions about IBDAC.
-
NicoCallewaert
- Posts: 3
- Joined: Mon 18 Apr 2016 08:12
Re: Attempted update of read-only column
Thanks Viktor !