Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error FRM-40735 , ORA-01438

RakinJun 24 2007 — edited Jun 25 2007
Hi,

In my form, for the Master-Details Data Block, the DML source is Procedure,
For eg, the DetailsBlock name is "Files", and given below is the procedure to update that block. I have two doubts regarding to it,
1. When user click Save button , i want to execute this procedure for all the records, now it is updating only one row, because of dmlset(1) (how should i do loop, I am new baby).

2. Insert into TableA query is not executing, i am getting the error ORA -01438

Scenario is :
The datas are loaded into block from TableA and TableB.If the value of the column VALIDREJECTION is "InValid" then that row shoube be updated in the TableA, if it is not in TableA, then it should be inserted to TableA. That is TableB contains all records(both Valid & InValid) , but TableA contains only records with VALIDREJECTION ='InValid"

My Procedure is :

procedure filesUpdate(dmlset in out disputeFiles_tab) is

cursor c_files is
select FILEID
from TableA
where FILEID=dmlset(1).FILEID;

tempout TableA.fileid%type;

begin

if dmlset(1).VALIDREJECTION='Valid' then
DELETE FROM TABLEA WHERE FILEID=dmlset(1).FILEID;

else
--if Valid changed to InValid and updated, then it should be inserted

open c_files;
fetch c_files into tempout;

IF c_files%NOTFOUND then

insert into TableA(FILEID,VALIDREJECTION,USERID)
values(dmlset(1).FILEID,dmlset(1).VALIDREJECTION,
dmlset(1).USERID);

ELSE

update TableA
set FILEID=dmlset(1).FILEID,
VALIDREJECTION=dmlset(1).VALIDREJECTION,
USERID=dmlset(1).USERID,
where FILEID=dmlset(1).FILEID;

END IF;

close c_files;

end if;

end;

Thanks in Advance ,
bye bye
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2007
Added on Jun 24 2007
2 comments
7,646 views