Subject | IBOControls not updating when expected (after trig) |
---|---|
Author | Ryan Nilsson-Harding |
Post date | 2002-10-02T02:54:10Z |
Hi there,
I have a simple trigger, shown below, which sets or clears a 'bool'
field, depending on another fields null status:
CREATE TRIGGER UPD_CD FOR STOCK
ACTIVE BEFORE UPDATE POSITION 0
AS BEGIN
if (new.IS_NEW = 'N') then begin
if (new.NEW_NUM IS NOT NULL) then
new.IS_NEW = 'Y';
end
else begin
if (new.NEW_NUM IS NULL) then
new.IS_NEW = 'N';
end
END ^
This trigger works fine, and as expected, but the IB_Checkbox is not
updated until the dataset is closed then re-opened.
I was hoping this would be reflected straight after a
CommitRetaining (prefereably the POST method even) but the whole
dataset needs what appears to be a hard commit before it will
display this reflected update.
How can I get the control to reflect this change immediately after a
post? (or commitRetaining if it must be)
The reason I would like it straight after the 'post' is obviously
for user's satisfaction.
Also, IBExpert shows the update immediately after a post. i.e.
before either commit or commitRetaining, so I'm sure it can be
achieved.
Rgds,
-Ryan
I have a simple trigger, shown below, which sets or clears a 'bool'
field, depending on another fields null status:
CREATE TRIGGER UPD_CD FOR STOCK
ACTIVE BEFORE UPDATE POSITION 0
AS BEGIN
if (new.IS_NEW = 'N') then begin
if (new.NEW_NUM IS NOT NULL) then
new.IS_NEW = 'Y';
end
else begin
if (new.NEW_NUM IS NULL) then
new.IS_NEW = 'N';
end
END ^
This trigger works fine, and as expected, but the IB_Checkbox is not
updated until the dataset is closed then re-opened.
I was hoping this would be reflected straight after a
CommitRetaining (prefereably the POST method even) but the whole
dataset needs what appears to be a hard commit before it will
display this reflected update.
How can I get the control to reflect this change immediately after a
post? (or commitRetaining if it must be)
The reason I would like it straight after the 'post' is obviously
for user's satisfaction.
Also, IBExpert shows the update immediately after a post. i.e.
before either commit or commitRetaining, so I'm sure it can be
achieved.
Rgds,
-Ryan