Subject Re: [IBO] Before Post on TIBOTable
Author TeamIBO
> It doesn't appear this event handler is getting called. I have a
> TIBOTable and have setup the following code on the BeforePost Event:

> if tblHistoryCompanyRate.FieldByName('RATE_FAMILY').value = NULL
> then
> begin
> showMessage('Family Rate must be set before Posting');
> Abort
> end;

> I set a breakpoint and it never gets there. Additionally, I traced
> the program and it's going straight to TIBODataset.Post. Is this a
> known problem or am I doing something stupid?

(PS)
> It appears that if the TIBODataSet.Post is successful, the Delphis
> BeforePost event handler is called....but that's too late for me ;-\


Hi Lauren,

This appears to be another message we've missed for a few days.

I just ran a small experiment in IBO4.2.Fp, Delphi5

procedure TForm1.IBOTableBeforePost(DataSet: TDataSet);
begin
ShowMessage( 'TIBOTable Before Post' );
end;

and I got the message. A breakpoint shows that it does occur before
the actual post operation was executed (this is inside the Post
method, but before the actual operation is executed).

AFAICT it should not matter which IBO version you are using, since the
BeforePost event handling is done within TDataset itself (VCL code).
But I guess it would not hurt upgrade and check anyway.

So I think we will need more information, including what Delphi
version etc before we can be of any more help. Perhaps you should try
to setup a small demonstration using the Employee.GDB database to see
if you can reproduce the problem outside your main app.


--
Geoff Worboys - TeamIBO
Telesis Computing