Tuesday, May 5, 2009

KEY-DUPREC Trigger

Key-DupRec trigger is used to Copy previous record to current record in Create Record Mode. Whole record contains from last record including Sequence numbers are copied and newly record is not marked for validation. Item level validations are fired unless we go to item of newly created record and try to change it. If you are using PRE-INSERT trigger to generate Record last Change Details, auditing and Sequence number then duplicated records will have values calculated/generated in PRE-INSERT trigger.

Its is always better idea to code constraints to database side. If you code constraints at database end then

1) Constraint violating record never will be in database.

2) If your application have different middle tier and client tier implemented in different technologies/channels then you can just catch these ora errors and make them user friendly before displaying.

Wednesday, April 22, 2009

Oracle form size-(Introduction of P-Code???)

Yesterday I was doing some maintenance on one form. So achieve desired functionality I modified it. I hardly added 4-6 procedures of average 8-10 line of codes. Initially forms .fmb size was about 3.4MB. After modification it become around 8.5MB. I was wondering what has happened with form…

One of my Team member suggest me to replace ‘;’ with ‘;’ in all code which is very common solution is something is not working as expected. I did so. But Due to that is it broken inheritance “Trigger Text” of inherited trigger at Form, Block and item level. Property classes trigger’s inheritance was also broken. So I have to re-inherit all the triggers manually. Finally form size was reduced to 3.2MB. That guy told me that “P-code” has been inserted into form. I googled for p-code related to Oracle forms but unfortunately i didn’t get any information.

So chaps do have any idea, thoughts on it. Please reply.