Home » Developer & Programmer » Forms » frm-41003 this function cannot be performed here
frm-41003 this function cannot be performed here [message #606110] Mon, 20 January 2014 00:25 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I got frm-41003 this function cannot be performed, after i put the empno & click the find button to display the employees details in the stacked canvas.

My Requirement is , enter the empno(7369) click on the find button display records in the stacked canvas , i have create 2 blocks(emp,ctrl), i have written code in the find button in the control block.
when-button-pressed
BEGIN 
    --GO_BLOCK('EMP'); 
    Message('Emp num : ' ||:Emp.empno); 

    Set_block_property('EMP', default_where, 'Emp.Empno = :EMP.Empno'); 

    execute_query; 

    Set_block_property('EMP', default_where, ''); 

    Show_view('EMP_DET_CAN'); 
EXCEPTION 
    WHEN no_data_found THEN 
      Message('no record found'); 

      commit_form; 
END; 

Re: frm-41003 this function cannot be performed here [message #606113 is a reply to message #606110] Mon, 20 January 2014 00:55 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you commented GO_BLOCK, your procedure sets the DEFAULT_WHERE for the EMP block but stays in the control blocks and tries to perform EXECUTE_QUERY on the control block, which is a function that can not be performed there.

Besides, EXCEPTION handler section does nothing. This code can't raise NO-DATA-FOUND, but the utmost mystery is why would you perform COMMIT if no data has been found?
Re: frm-41003 this function cannot be performed here [message #606115 is a reply to message #606113] Mon, 20 January 2014 01:08 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thank You for reply Littlefoot,

I entered 7369 as empno and clicked on the find button it shows alert yes/no/cancel with the Tooltip message as frm-41056 cannot find block invalid id. If press NO then only it returns records, But i want to display 7369 records only & Here I pressed PgDn arrow , it shows all employees records. Suggest me please.

Declare
	 finalstr varchar2(1000);
	 dfinalstr varchar2(1000);
BEGIN 
   finalstr := 'WHERE 1=1';
    go_block('EMP');
    dfinalstr := Get_block_property('EMP', default_where);
    finalstr := finalstr || 'AND empno =' ||( ':EMP.empno' ); 
    Set_block_property('EMP', default_where, finalstr);

    Show_view('EMP_DET_CAN'); 
    
    execute_query();
    
EXCEPTION 
    WHEN no_data_found THEN 
      Message('no record found'); 

      --commit_form; 
END; 


Thank You

[Updated on: Mon, 20 January 2014 01:08]

Report message to a moderator

Re: frm-41003 this function cannot be performed here [message #606119 is a reply to message #606113] Mon, 20 January 2014 01:23 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi

I am getting all records(14) when i pass empno as 7369 & when i pressed the PgDn arrow.

finalstr := 'WHERE 1=1';
   
    go_block('EMP');
    
    finalstr := finalstr || 'AND empno =' ||( ':EMP.empno' );
    
    Show_view('EMP_DET_CAN'); 

    execute_query();
Re: frm-41003 this function cannot be performed here [message #606120 is a reply to message #606115] Mon, 20 January 2014 01:23 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Investigate "frm-41056 cannot find block invalid id".

Which Forms version do you use? If it is 10g (or above), run the form in debug mode which will tell you which line raised the error. If 6i, include MESSAGE calls into the trigger (for the same reason - to find the culprit).

As of FINALSTSR: before setting it to the DEFAULT_WHERE, display it on the screen. It seems that it evaluates to an invalid value, something like
WHERE 1=1AND emp = ...
Re: frm-41003 this function cannot be performed here [message #606130 is a reply to message #606120] Mon, 20 January 2014 03:32 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

I attached .fmb file, could you please help me on this? I want to show records in the stacked canvas , when i pass the empno.

Thank You
  • Attachment: CAN_TEST.fmb
    (Size: 48.00KB, Downloaded 1224 times)
Re: frm-41003 this function cannot be performed here [message #606131 is a reply to message #606130] Mon, 20 January 2014 03:35 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sorry, I can't do that.
Re: frm-41003 this function cannot be performed here [message #607327 is a reply to message #606131] Tue, 04 February 2014 23:18 Go to previous message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:

I got frm-41003 this function cannot be performed, after i put the empno & click the find button to display the employees details in the stacked canvas.

My Requirement is , enter the empno(7369) click on the find button display records in the stacked canvas , i have create 2 blocks(emp,ctrl), i have written code in the find button in the control block.


I found the solution by this code in the button(In control Block)

Set_block_property('EMP', default_where, 'Empno = :EMP.EMPNO');-->Before


Set_block_property('EMP', default_where, 'Empno = '||:EMP.EMPNO); -->Worked


Thank You
Previous Topic: ora-12514 TNS:listener does not currently know of service
Next Topic: How to make selected text bold in text item using oracle form 6i
Goto Forum:
  


Current Time: Wed Apr 24 19:14:10 CDT 2024