Subject | Re: [firebird-support] update a field in after insert update |
---|---|
Author | Maurizio |
Post date | 2009-03-15T12:57:23Z |
thank you for answers ,
anyway i have choosen to set that value from Delphi dataset event .
bye
Maurizio
Ann W. Harrison ha scritto:
anyway i have choosen to set that value from Delphi dataset event .
bye
Maurizio
Ann W. Harrison ha scritto:
> Maurizio,
>
> In case it wasn't absolutely clear, you can't change a value
> in an after insert trigger by straight forwardly updating
> new.<fieldname>. After action triggers happen -- oddly enough --
> after the action. Earlier versions of Firebird accepted those
> assignments and quietly dropped them on the floor. More modern
> versions will produce an error if you attempt to assign a value
> to the target row in an after action trigger.
>
> If the change must actually be done after the insert occurs,
> you could try something like this:
>
> update test_table s
> set s.kyriga = 'test'
> where s.<primary key> = new.<primary key>
>
> replacing <primary key> with the name of the primary key field.
>
> Good luck,
>
> Ann
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>
>
>