<snip>
When it comes to feedback from a business logic trigger to say, JDBC,
how will the ILE public data structure export help?
--buck
</snip>
Good point.
When you use a constraint, and you give it a decent name (unlike the
default I used below) and you get a constraint error you will get a
message like this in iNav's Run SQL scripts
INSERT INTO rob.nathan (mydata) VALUES('A')
SQL State: 23513
Vendor Code: -545
Message: [SQL0545] INSERT, UPDATE, or MERGE not allowed by CHECK
constraint. Cause . . . . . : The value being inserted or updated does
not meet the criteria of CHECK constraint Q_ROB_NATHAN_MYDATA_00001. The
operation is not allowed. Recovery . . . : Change the values being
inserted or updated so that the CHECK constraint is met. Otherwise, drop
the CHECK constraint Q_ROB_NATHAN_MYDATA_00001.
Now, that constraint name could have been given a name like
ValidTypesAre... or some such thing. And you could base your error
handling on this return data. Like, highlight the type.
The big difference here is that each constraint has it's own name. A
trigger could handle multiple things. So even if you could name your
trigger, and DB2 echoed it back, it might not be enough to do squat.
Especially if you were using some generic trigger mediator.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.