shruti27
asked on
error frm 40352 last record of query retrieved
i am working in oracle forms, and have written a function inside a form which searches a particular value in the set of records.
the function is working fine but if i enter a value which is not there in the record, it pops up a message box with error " FRM-40352 : last record of query retrieved." though it is not effecting the form, i dont want this message box to pop up.
attached is the code of the function.
the function is working fine but if i enter a value which is not there in the record, it pops up a message box with error " FRM-40352 : last record of query retrieved." though it is not effecting the form, i dont want this message box to pop up.
attached is the code of the function.
FUNCTION find_matcode(block_name varchar2,searchstr varchar2, total_rec number) RETURN number IS
r_count integer;
found boolean := false;
BEGIN
r_count:=1;
go_block(block_name);
first_record;
while r_count <= total_rec
loop
if :system.cursor_value=searchstr then
message('found equal');
found := true;
go_record(r_count);
exit;
else
r_count:=r_count+1;
next_record;
end if;
end loop;
if found = false then
message (' no match found ');
first_record;
end if;
return 0;
exception
when others
then message('ERROR1 '||sqlerrm);
END;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hey thanks done that but still getting the other two errors:
FRM-40400: Transaction complete:1 records updated
FRM-40352: Last record of query retrieved
any way to get rid of them?
FRM-40400: Transaction complete:1 records updated
FRM-40352: Last record of query retrieved
any way to get rid of them?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
still the error FRM-40400: Transaction complete:1 records updated is there
moreover if i remove the +1 my purpose is not solved...i want to check all the records and by removing +1 my last record gets ommitted.
moreover if i remove the +1 my purpose is not solved...i want to check all the records and by removing +1 my last record gets ommitted.
Sorry my mistake but i checked the oracle website errors details and it seems that those two errors are informative errors.
Check the following link:
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cerrorsfrm%7Cfrm-40352~html/
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cerrorsfrm%7Cfrm-40400~html/
Check the following link:
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cerrorsfrm%7Cfrm-40352~html/
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cerrorsfrm%7Cfrm-40400~html/
If you still want to hide it then i would suggest to substitute the code(s) "when others then message(sqlerrm);" with "when others then null;". But i don't think that would be considered good practice.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks jinesh, the code is working well with the for loop.
but is there any way i can get rid of the "transaction complete" note?
since i am using database block, i have to use the command commit_form!
but is there any way i can get rid of the "transaction complete" note?
since i am using database block, i have to use the command commit_form!
Well, for my app, most of the times, the Transaction Completed message appears on the status bar and not as a separate dialog, so i don't know to control it. Unfortunately, I don't think COMMIT_FORM provides for any parameters to suppress that message :(
ASKER
ok i guess i will work with the present scenario...thanks a lot for help. m accepting ur soln
Glad to be of help :)
ASKER
Hi Vee_Mod, i got your point but how do i make changes in the present scenario cause i have already accepted on soln and given the points too!
ASKER
thanks.
ASKER
but i have one more error if you can help!
i have a code written in trigger of a button....have attached the code.
on executing it gives following error message pop up
FRM-40400: Transaction complete:1 records updated
FRM-40352: Last record of query retrieved
FRM-40102: Record must be entered or deleted first
the last error pop up goes on an infinite loop and i have to close the whole window!
Open in new window