How to control composit Primary key in apex form [message #434375] |
Wed, 09 December 2009 01:02 |
mahmud732
Messages: 82 Registered: October 2009 Location: Dhaka
|
Member |
|
|
Hi all,
I have a table named salary having composit primary key(empid,sal_month). Now i have to create a form which will help me to entry staff salary into this table.
Please help me any one.
Regards
Sultan Mahmud
|
|
|
|
Re: How to control composit Primary key in apex form [message #447082 is a reply to message #434375] |
Thu, 11 March 2010 20:46 |
keywee2000
Messages: 7 Registered: March 2010 Location: Australia
|
Junior Member |
|
|
Hi Sultan,
I have implemented the "instead of" trigger method and it does get around the problem, but if you have control over your table structures then I would suggest that by far the easiest method is to add a numeric ID column to your table, create an oracle sequence and then add a trigger to the table that populates the sequence.
It makes life much easier when working with Apex, if you conform to the way in which Apex likes to work.
|
|
|
|
Re: How to control composit Primary key in apex form [message #447702 is a reply to message #434375] |
Wed, 17 March 2010 07:44 |
BBMamun
Messages: 94 Registered: February 2010 Location: Dhaka, Bangladesh
|
Member |
|
|
Hi Sultan Mahmud you can try making a primary key column with concatenation of emp_id and salary_month, create a computation on the primary key item(which may be hidden), source type pl/sql expression and source is :emp_id||:salary_month.
|
|
|
|
|