Subject | Re: [IBO] A few questions about IBO |
---|---|
Author | Geoff Worboys |
Post date | 2002-07-22T03:24:45Z |
> I just want to understand why IBO doesn't check the trigger beforeYes and no. I understand what you want but it is not practical for
> displaying the 'Required Field' error when posting, yet when I
> supply a 'PK' val, it is ignored and the proper trigger is used
> anyway.
> Does this make sense??
IBO to parse out trigger source (or BLR) code and try to determine
what is and is not happening. Where would you draw the line?
Triggers can call procedures that can call other procedures than can
insert other records with various side effects and so on.
So IBO limits itself to the practical - for example being able to see
that a field is required according to the table/field metadata
definition. It is not practical to try and see if the "required"
status is fulfilled by trigger.
If the PK you supply is being ignored then your trigger needs
changing. eg.
IF (NEW.PK IS NULL) THEN
NEW.PK = GEN_ID(MY_GEN,1);
So that the trigger will only supply a new PK value if no PK was
provided. This is not only important when using IBO but also many
other situations such as importing and transfering records.
You need to become used to being explicit with your select statements.
Only select fields you need, those fields you want to display but do
not want updated at the client should be specifically marked as
readonly (in the FieldsReadOnly property) so that IBO will not try to
post values for these fields - and so allow the triggers and default
definitions to do their work most effectively.
If you have not already done so I recommend looking at these
documents: http://www.ibobjects.com/TechInfo.html
In addition there is the Getting Started Guide available for a small
fee from the ibo website. I just wish it had been around when I was
starting :-)
--
Geoff Worboys
Telesis Computing