Hi there,
I'm having a problem updating a table in Oracle Forms 9i....
The user searches for a match in table A (consists of a sequential primary key and 4 other data fields) and if a match is found the results come up; they then choose one of the data fields by way of a radio button changing its value from y to n. However when it comes to committing it will not allow this and an error message saying cannot insert record pops up...looking at the error says unique constraint violated for the primary key. So its as if its trying to create a new set of data with the same primary key but the differing value for whatever the user chose. All I want is for it to update the data field in the already existing primary key.
Just to make sure the primary key was working ok I displayed it on-screen and it comes up fine. Just seems to want to insert rather then update! However I will need to insert too in case there is no match when the user performs the search. In this case a new primary key is generated with its respective data fields filled in. This inserts and commits fine, since there is no matching primary key. Its when it comes to updating an existing table that I encounter a problem.
Any ideas?
Thanks.
I'm having a problem updating a table in Oracle Forms 9i....
The user searches for a match in table A (consists of a sequential primary key and 4 other data fields) and if a match is found the results come up; they then choose one of the data fields by way of a radio button changing its value from y to n. However when it comes to committing it will not allow this and an error message saying cannot insert record pops up...looking at the error says unique constraint violated for the primary key. So its as if its trying to create a new set of data with the same primary key but the differing value for whatever the user chose. All I want is for it to update the data field in the already existing primary key.
Just to make sure the primary key was working ok I displayed it on-screen and it comes up fine. Just seems to want to insert rather then update! However I will need to insert too in case there is no match when the user performs the search. In this case a new primary key is generated with its respective data fields filled in. This inserts and commits fine, since there is no matching primary key. Its when it comes to updating an existing table that I encounter a problem.
Any ideas?
Thanks.