sqlforms problem

From: <ori645577316_at_emuvax.emich.edu>
Date: 19 Nov 93 16:45:25 EST
Message-ID: <1993Nov19.164525.429_at_emuvax.emich.edu>


Hello Oracle Users,

        I am creating an application in which there are two tables( Table1 and Table2). There exist 1:M relation between table1 and table2. There is a field  called MaterialType in Table1. This field can only have values such as 'A', 'E','P'. If the Materialtype is 'A' then only there are many records in Table2 pertaining to this Material. If the MaterialType is 'E' or 'P' the there are no records in table2.

Now table1 also has itemid,Stockinhand as a regular field and RecievedQty as a dummy field. When the new items come in, I query on Itemid in Table1. I enter the quantity recieved in Recievedqty Field through the form.

Now It should add this quantity to stockinhand and update it to the new stockin hand. Also If the Material type is 'A' then we have to enter a number of records which is equal to Recievedqty. It should not alow me to get out of the form untill I have entered that many records.

If the Materialtype is 'E' or 'P' then we don't need to go to table2. Only the stockinhand should be updated. I am writing the code in Key-Commit trigger I cannot write a post-commit or pre commit trigger to update stockinhand because when I try to commit it says no changes to commit. Probably because I have a dummy field and no changes are made in the regular fields. I am using SYSTEM_CURSOR.RECORD to count the nuber of records which I am inputting but it is not working.

The fields in Table2 are Serial#, Model, Make

Any suggestions how to handle this.

                                                     THANKX 
Received on Fri Nov 19 1993 - 22:45:25 CET

Original text of this message