Home » Developer & Programmer » Forms » Enforcing a primary key in a control block Oracle Forms 6i (Windows)
Enforcing a primary key in a control block Oracle Forms 6i [message #454594] Thu, 06 May 2010 06:57 Go to next message
razaimran
Messages: 6
Registered: May 2010
Location: Programmer
Junior Member
I have created a data Bolck Manually.I had used select query to fetch records into the data block.
There's and add button in the form to add more records to this block.Now WhEn i press add buton and enter new records i want to ensure the Primary key ie the the new record entered does not repeat across the block.I cannot loop through and check as the number of records fetched is quite huge.

Please How can i enforce a primary key in a control block Oracle Forms 6i.
Thanks in Advance
Imr

[Updated on: Thu, 06 May 2010 08:16]

Report message to a moderator

Re: Enforcing a primary key in a control block Oracle Forms 6i [message #454652 is a reply to message #454594] Thu, 06 May 2010 13:12 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Quote:
I have created a data Bolck Manually.I had used select query to fetch records into the da..

Quote:
Please How can i enforce a primary key in a control block Oracle..


I don't think that it is logical to enforce primary key into a control block. Now if you are fetching data using a From Clause Query, How you are inserting data into table? probably you may be using an insert statement? so why cant you use exceptions handlers(DUP_VAL_ON_INDX) to find whether primary key is violated or not.?

Re: Enforcing a primary key in a control block Oracle Forms 6i [message #454675 is a reply to message #454594] Thu, 06 May 2010 15:58 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't quite understand reasons that lead to such a design, but - you could use a sequence (an Oracle database object) for a primary key.
Previous Topic: profiles B/D and Forms 6i
Next Topic: frm-41211 integration error: SSL failure running another product
Goto Forum:
  


Current Time: Fri Sep 20 08:14:08 CDT 2024