frm-40350 query caused no records to be retrieved
Hi All,
I was working with oracle forms 10g.
I have a custom form. And two block. One is query Find block and other is My main block.
In the query find block the user will give po_number and click find button it will move to the main block and query the record.
If when the user type some other po number that not in my custom table and click find button its moving to my main block and showing this error.
So i handled ON_ERROR and ON MESSAGE Trigger but still it moving to my main block and now the error is not showing. But still its moving to my main block.
This is my procedure code and i was calling in my find button
procedure XXBANK_GUARANTEE_FIND_DATA is
cursor c_query_find_details
is
select Distinct C_PROJECT_ID,C_PO_NUMBER,C_SUPPLIER_NAME,C_SUPPLIER_SITE_NAME
from XXBGS_BANK_GUARANTEE_MASTER
where (C_PO_NUMBER= :QUERY_FIND_BLK.C_PO_NUMBER or :QUERY_FIND_BLK.C_PO_NUMBER is null)
and (C_PROJECT_ID=:QUERY_FIND_BLK.C_PROJECT_NAME or :QUERY_FIND_BLK.C_PROJECT_NAME is null)
and (C_SUPPLIER_NAME= :QUERY_FIND_BLK.C_SUPPLIER_NAME or :QUERY_FIND_BLK.C_SUPPLIER_NAME is null)
and (C_SUPPLIER_SITE_NAME= :QUERY_FIND_BLK.C_SUPPLIER_SITE or :QUERY_FIND_BLK.C_SUPPLIER_SITE is null);
begin
go_block('BANK_GUARANTEE_BLK');
CLEAR_BLOCK(no_validate);
for c_query_find_details_rec in c_query_find_details
loop
:BANK_GUARANTEE_BLK.C_PROJECT := c_query_find_details_rec.C_PROJECT_ID;
:BANK_GUARANTEE_BLK.C_PO_NUMBER := c_query_find_details_rec.C_PO_NUMBER;
:BANK_GUARANTEE_BLK.C_SUPPLIER_NAME := c_query_find_details_rec.C_SUPPLIER_NAME;
:BANK_GUARANTEE_BLK.C_SUPPLIER_SITE_NAME := c_query_find_details_rec.C_SUPPLIER_SITE_NAME;
NEXT_RECORD;
end loop;
FIRST_RECORD;
Exception
when too_many_rows then
null;
When no_data_found then
Message('No Records Found);
when others then
null;
end XXBANK_GUARANTEE_FIND_DATA;
And I have written onetime_where clause in my FIND button. For some reason.
I have called my procedure and this onetime_where clause only in my find button but I cant able to find why its navigating to next block. Even though i have handled exception in my onetime_where clause but no use.
set_block_property('BANK_GUARANTEE_BLK',ONETIME_WHERE,
'(C_PO_NUMBER =:QUERY_FIND_BLK.C_PO_NUMBER OR :QUERY_FIND_BLK.C_PO_NUMBER IS NULL) AND
(C_PROJECT_ID =:QUERY_FIND_BLK.C_PROJECT_NAME OR :QUERY_FIND_BLK.C_PROJECT_NAME IS NULL) AND
(C_SUPPLIER_NAME =:QUERY_FIND_BLK.C_SUPPLIER_NAME OR :QUERY_FIND_BLK.C_SUPPLIER_NAME IS NULL) AND
(C_SUPPLIER_SITE_NAME =:QUERY_FIND_BLK.C_SUPPLIER_SITE OR :QUERY_FIND_BLK.C_SUPPLIER_SITE IS NULL) ');
go_block('BANK_GUARANTEE_BLK');
execute_query(NO_VALIDATE);
Can Any one tell me how to handle this.
Thanks & Regards
Srikkanth