LOV error frm-40508 [message #168427] |
Thu, 20 April 2006 06:34 |
Ducca
Messages: 2 Registered: April 2006 Location: UK
|
Junior Member |
|
|
I,ve created a form which as various text fields which will enable me to update a table, I,m using a lov to select the values from the database.
declare
lov_return boolean;
begin
lov_return := show_lov ('PRODUCTS_NULL_CATEGORY');
execute_query;
end;
the lov populates 3 text fields, and is called via a wbp trigger,
when the text fields are populated and the values are put in the text fields, I then get the error 40508 unique constraints
but I don,t get the error if I use the query button to query then save the changes.I need to select the products that have a null value for the product category and then insert the relevant product category, again from another lov
The lov is using the following query:
SELECT PRODUCT.P_ID, PRODUCT.NAME, PRODUCT.PROD_DESC
FROM PRODUCT
WHERE PROD_CATEGORY IS NULL
Thanks in advance for any help
|
|
|
Re: LOV error frm-40508 [message #168429 is a reply to message #168427] |
Thu, 20 April 2006 06:54 |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Ducca,
I think I see the problem:
When you use the LOV with the query, you select a P_ID.
I think this is the primary key.
So everytime you insert these values in the block and try to save them, you will always get the error.
When you query and then update, you will of course not get this error.
HTH,
Regards,
Rob Zijlstra
|
|
|
Re: LOV error frm-40508 [message #168453 is a reply to message #168427] |
Thu, 20 April 2006 09:08 |
Ducca
Messages: 2 Registered: April 2006 Location: UK
|
Junior Member |
|
|
Hi Rob,
Thanks for reply
Thats exactly it but how do i make the lov value so it can be updated, i,ve tried the execute_query function as I call the lov trigger, but gives the error,,,,
I need to be able to insert the value from the lov and then update that value.
thanks very much for your help
|
|
|
|