|
|
|
Re: Bad bind variable error [message #588874 is a reply to message #588870] |
Sat, 29 June 2013 04:04 |
|
smehta25
Messages: 5 Registered: June 2013 Location: Jammu
|
Junior Member |
|
|
Thanks for the reply ... Below are the contents of the WHEN-NEW-FORM-INSTANCE trigger
DECLARE
counter NUMBER(2);
sett_itm ITEM;
dflt_dir VARCHAR2(256);
app_name applications.application_desc%TYPE;
BEGIN
EXECUTE_TRIGGER('WNFI');
DEFAULT_VALUE('','GLOBAL.user_code');
DEFAULT_VALUE('','GLOBAL.user_dsp_name');
app_name := 'Unknown';
IF :SYSTEM.CURRENT_FORM = 'NHPC' THEN
disable_menu;
END IF;
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE, 'National Hydroelectric Power Corporation ' || ' User : ' || :GLOBAL.user_code);
READ_IMAGE_FILE('nhpc.bmp', 'BMP', 'tool.nhpcpic');
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WINDOW_STATE,MAXIMIZE);
dflt_dir := GET_FORM_PROPERTY('nhpc', FILE_NAME);
FOR cntr IN REVERSE 1..LENGTH(dflt_dir)
LOOP
IF SUBSTR(dflt_dir, cntr, 1) = '\' THEN
counter := cntr;
EXIT;
END IF;
END LOOP;
dflt_dir := SUBSTR(dflt_dir, 1, counter);
:GLOBAL.default_dir := dflt_dir;
END;
IF :GLOBAL.user_code <> '' THEN
GO_BLOCK('control');
END IF;
:tool.dsp_heading := 'National Hydroelectric Power Corporation';
FOR apprec IN ( SELECT application_desc
FROM applications
WHERE application_code = ( SELECT application_code
FROM modules
WHERE module_code = :system.current_form))
LOOP
:tool.dsp_heading := apprec.application_desc;
END LOOP;
FOR apprec IN ( SELECT module_desc
FROM modules
WHERE module_code = :system.current_form)
LOOP
:tool.dsp_sub_heading := apprec.module_desc;
END LOOP;
Waiting for your reply.
Thanks & Regards,
Seerat
[EDITED by LF: applied [code] tags]
[Updated on: Sat, 29 June 2013 04:24] by Moderator Report message to a moderator
|
|
|
Re: Bad bind variable error [message #588877 is a reply to message #588874] |
Sat, 29 June 2013 04:33 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I suppose that ":tool.dsp_heading" and ":tool.dsp_sub_heading" represent items that belong to the TOOL block. Is that so? If not, what are they?
Code you posted seem to be OK; I don't see anything wrong in:tool.dsp_heading := 'National Hydroelectric Power Corporation';
or
:tool.dsp_heading := apprec.application_desc;
or
:tool.dsp_sub_heading := apprec.module_desc;
which are lines that contain these items.
However, your initial post says that Quote:BLOCK: WHEN-NEW-FORM-INSTANCE(Form),5 errors You named 4 of them (in the same initial message), two of them mentioning DSP_HEADING and two of them DSP_SUB_HEADING. Finally, code you posted contains 3 lines (2 with DSP_HEADING, 1 with DSP_SUB_HEADING).
Therefore, something is missing and is not right. 5 <> 4 <> 3. So, what is the truth?
Finally, did you try to compile all (Ctrl + Shift + K)?
|
|
|
|
Re: Bad bind variable error [message #588881 is a reply to message #588879] |
Sat, 29 June 2013 04:59 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If there's no block named "tool" (and, possibly, no items named "dsp_heading" and "dsp_sub_heading"), no wonder you got errors. What did you expect?
|
|
|