Dual row getting inserted in DB through Oracle Form

51 Views Asked by At

I have created a simple Oracle form where I am asking user 4-5 inputs and on click of Button(when-button-pressed trigger) I have written an insert statement, then commit.

When I am pressing the Button 2 records with same details are getting inserted. i am unable to understand why. Oracle message is comming as FRM40400 1 transection applied and saved. But in DB table 2 rows are comming with the same data. Please help.

1

There are 1 best solutions below

3
Littlefoot On

Forms just did what you instructed it to - to insert two rows. How?

  • that's - I presume - data block (i.e. based on some table)
  • it means that all values you insert into fields are automatically inserted into the underlying table as soon as you commit
  • the second rows gets inserted with insert statement you wrote behind the trigger
    • remove it; you don't need it. You would if it were a control block but - apparently - it is not
    • if you want to keep the button (which just commits), OK - leave it, just remove insert statement from it

It seems that you don't quite understand how Forms work. Read some documentation about it, for your own sake. Online Forms Help system (the one that shows up when you press F1 key) should get you started.