Subject | Before Insert Trigger |
---|---|
Author | Sergio |
Post date | 2006-03-21T01:02:02Z |
Hi All.
I have declared a Before Insert Trigger, and in that trigger a need to
assign a value to a field. That value depend of some conditions.
In my Delphi project (WXP, D7, IBO v4.5, FB v1.5.3) I'm using a TIBOQuery
component, and some Delphi's visual native components (TDBGrid, and so on).
Everything is fine, but when I insert a new record (and before post it) I
need to view a value that the server assigned to that field. Exist some way
to do it?
My trigger looks something like that:
CREATE TRIGGER TriggerName FOR TableName ACTIVE
BEFORE INSERT POSITION 1
AS
BEGIN
:
:
IF (SomeCondition) THEN
NEW.MyField = SomeValue
ELSE
NEW.MyField = AnotherValue;
:
:
END
Thanks, and sorry my English.
With Regards
Sergio
I have declared a Before Insert Trigger, and in that trigger a need to
assign a value to a field. That value depend of some conditions.
In my Delphi project (WXP, D7, IBO v4.5, FB v1.5.3) I'm using a TIBOQuery
component, and some Delphi's visual native components (TDBGrid, and so on).
Everything is fine, but when I insert a new record (and before post it) I
need to view a value that the server assigned to that field. Exist some way
to do it?
My trigger looks something like that:
CREATE TRIGGER TriggerName FOR TableName ACTIVE
BEFORE INSERT POSITION 1
AS
BEGIN
:
:
IF (SomeCondition) THEN
NEW.MyField = SomeValue
ELSE
NEW.MyField = AnotherValue;
:
:
END
Thanks, and sorry my English.
With Regards
Sergio