Subject | Re: [firebird-support] attempted update of read-only column |
---|---|
Author | Chris M |
Post date | 2006-07-13T19:27:42Z |
The after update trigger references old but does not update it.
if (new.invoicestatus <> old.invoicestatus) then
Dmitry Yemanov wrote:
if (new.invoicestatus <> old.invoicestatus) then
Dmitry Yemanov wrote:
> "Chris Meelhuysen" <chris@...> wrote:
>> update invoiceheader
>> set paymentduedate =cast((:ptCalcDate + (:ptDays *
>> :ptBeforeOrAfter)) as date)
>> where invoiceheaderid = new.invoiceid;
>>
>> it receives this message
>>
>> General SQL error.attempted update of read-only column.
>
> Table "invoiceheader" has a before update trigger which assigns to the OLD
> context or an after update trigger that assigns to the NEW context.
>
>
> Dmitry
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>