Home » Developer & Programmer » Forms » Inserting Multiple Records when we Press Button In the FOrms (Oracle forms 10g)
Inserting Multiple Records when we Press Button In the FOrms [message #557903] Sun, 17 June 2012 11:16 Go to next message
kommerashashi
Messages: 23
Registered: November 2007
Junior Member
Hi friends... i have one doubt ...

In the Forms, I have Multi record Block and for that block i have created one button, if we press that buttion it will open new block and it will post the records,

Un fourtunately that block table dont have Primary key or any constraints .. so when we press that buttoon multiple times .. its posting multiple times..

Now i need to restrict to that which is should not post the records multiple timies ..

i have tried by controling the paraemter..


I have created one Non data base item initially value i assigned to 'N"

if the value is "N" then am doing process and showing the records and after processing am assigning the value to 'Y',
if there are multiple records , at block level in pre-record trigger am assigning as 'N'

but this approach is not working .. for few scenarios.

Can anyone help on this is there any good approach..Its very helpful to me if anyone helps


Re: Inserting Multiple Records when we Press Button In the FOrms [message #557905 is a reply to message #557903] Sun, 17 June 2012 12:07 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
that block table dont have Primary key or any constraints

Why don't you create it / them?

Alternatively, check whether record(s) that are contained in the data block already exist in that table (using a SELECT statement). It *would* be much easier if there was a unique identifier there. If there's none, you'll probably have to compare all items with appropriate columns. If such a record already exists in a table, don't insert it again (possibly, remove it from a data block).
Re: Inserting Multiple Records when we Press Button In the FOrms [message #558134 is a reply to message #557903] Tue, 19 June 2012 10:48 Go to previous message
kommerashashi
Messages: 23
Registered: November 2007
Junior Member
Thanks For the Suggetion tomorrow , i will implement and confirm once i get

Really thanks alot
Previous Topic: fetch record in a datablock
Next Topic: showing wrong code - list item (urgent)
Goto Forum:
  


Current Time: Fri Jul 05 22:37:44 CDT 2024