Home » Developer & Programmer » Forms » Oracle Forms Check Box 'FRM-40505' (Oracle Developer 6.0 on Windows XP)
Oracle Forms Check Box 'FRM-40505' [message #324052] Fri, 30 May 2008 07:56 Go to next message
RickyGilles
Messages: 6
Registered: May 2008
Location: Milan
Junior Member
I've to apologize for my low english, so I hope to let understand.
I've a problem with a checkbox on a form. The value when it's checked is 'S' and when it's unchecked is 'N'. Default is checked.
The same checkbox is designed in another form, with same values and same pl/sql code, but in first form he code is directly written on checkbox pl/sql code popup. In second form the chechbox call a procedure where it's written the same code.
My question is: when i uncheck the query runs. If I try to check again, the query doesn't run and I have this problem: FRM-40505.
The code of checkbox is:

DECLARE
WHRCND VARCHAR2(32000);
BEGIN
IF :CHK_LIC='S' THEN
WHRCND:=GET_BLOCK_PROPERTY('ANG',DEFAULT_WHERE);
:PARAMETER.P_WHRINZ:=WHRCND;
WHRCND:=WHRCND||' AND ANG_DTA_FIN_CTR IS NULL';
GO_BLOCK('ANG');
SET_BLOCK_PROPERTY('ANG',DEFAULT_WHERE,WHRCND);
CLEAR_BLOCK(ASK_COMMIT);
EXECUTE_QUERY;
ELSE
GO_BLOCK('ANG');
SET_BLOCK_PROPERTY('ANG',DEFAULT_WHERE,:PARAMETER.P_WHRINZ);
CLEAR_BLOCK(ASK_COMMIT);
EXECUTE_QUERY;
END IF;
END;

please help me, cuz it's important for a business environment.
Thanks
Re: Oracle Forms Check Box 'FRM-40505' [message #324102 is a reply to message #324052] Fri, 30 May 2008 16:23 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
FRM-40505: ORACLE error: unable to perform query.

Cause:  Processing error encountered. The table associated with the current block of the form might not exist, or your username might not have authority to perform the specified action on the table.

Action:  Pressing [Display Error] provides more information, if it is available. You can also try to update or delete this record later. If necessary, contact your DBA.

So, navigate to Help menu and select "Display Error". Copy-paste message output here.
Re: Oracle Forms Check Box 'FRM-40505' [message #324829 is a reply to message #324052] Wed, 04 June 2008 04:26 Go to previous messageGo to next message
RickyGilles
Messages: 6
Registered: May 2008
Location: Milan
Junior Member
In display errors box I have following message on "SQL Statement in error":
SELECT ROWID, ang_cdc_sct, ang_cdc_dpn, ang_cgn, ang_nme, ang_mtr_dpn,
  ang_type, ang_cdc_sct_perqll, ang_cdc_cnt, ang_cdc_qlf, ang_cdc_lvl,
  ang_cdc_inl, ang_cdc_sct_perinl, ang_cdc_ses, ang_via, ang_cap, ang_cit,
  ang_cdc_prv, ang_cdc_nzn, ang_cdc_sde, ang_cdc_sct_persdi, ang_cdc_stb,
  ang_cdc_sct_perstb, ang_cdc_rpt, ang_cdc_sct_perrpt, ang_cnt_cst,
  ang_cdc_sct_perccs, ang_pos_crt, ang_cdc_sct_perpos, ang_cdc_mns,
  ang_cdc_sct_permns, ang_cdc_ru1, ang_cdc_sct_traru1, ang_cdc_ru2,
  ang_cdc_sct_traru2, ang_cdc_ru3, ang_cdc_sct_traru3, ang_cdc_ru4,
  ang_cdc_sct_traru4, ang_cdc_ru5, ang_cdc_sct_traru5, ang_cdc_ru6,
  ang_cdc_sct_traru6, ang_cdc_bdg, ang_crt, ang_prf_fsc, ang_cdc_sct_trafsp,
  ang_cdc_sqn, ang_cdc_sct_persfs, ang_prf_ctr, ang_cdc_sct_perctm,
  ang_prf_trm, ang_cdc_sct_pertrp, ang_orr_grn, ang_prc_prt, ang_orr_stt,
  ang_pwd, ang_dta_spt, def_utn, ang_utn_rsp, ang_dat_inz_ctr,
  ang_dta_fin_ctr, ang_cdc_sct_persce, ang_cdc_dpn_tradpn, ang_cdc_sct_tradpn,
  ang_dpn_1, ang_mtv_vst, ang_nte, ang_tpo_est, ang_utn_crz, ang_utn_mdf,
  ang_dta_crz, ang_dta_mdf
FROM ang
WHERE AND ang_dta_fin_ctr IS NULL
ORDER BY ang_cdc_sct, ang_cdc_dpn


and this message in "Error"
ORA-00936: missing expression

[EDITED by LF: got tired of scrolling miles left and right to view messages. Reformatted this query and added [code] tags]

[Updated on: Thu, 05 June 2008 04:39] by Moderator

Report message to a moderator

Re: Oracle Forms Check Box 'FRM-40505' [message #324831 is a reply to message #324829] Wed, 04 June 2008 04:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wow! What a nice formatting!

Shortly, it looks like this:
SELECT bunch_of_columns
FROM ang
WHERE AND ang_dta_fin_ctr IS NULL     --> note WHERE AND
ORDER BY ang_cdc_sct, ang_cdc_dpn

It seems that you'll have to think some more about the seventh line of code in your first message; it is
WHRCND:=WHRCND||' AND ANG_DTA_FIN_CTR IS NULL';
Re: Oracle Forms Check Box 'FRM-40505' [message #324844 is a reply to message #324831] Wed, 04 June 2008 05:42 Go to previous messageGo to next message
RickyGilles
Messages: 6
Registered: May 2008
Location: Milan
Junior Member
Ok, but I don't understand why the same line in the same code, in a form runs perfectly, in another form doesn't
Re: Oracle Forms Check Box 'FRM-40505' [message #324852 is a reply to message #324844] Wed, 04 June 2008 06:15 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Probably because these forms aren't identical.
Re: Oracle Forms Check Box 'FRM-40505' [message #325152 is a reply to message #324852] Thu, 05 June 2008 03:02 Go to previous messageGo to next message
RickyGilles
Messages: 6
Registered: May 2008
Location: Milan
Junior Member
Ok, but where I can't modify the SQL statement??? Because I have a similar problem in another form with an insert statement, that should be an update statement. Where i can find the statement code showed in display errors box?!?!
Re: Oracle Forms Check Box 'FRM-40505' [message #325178 is a reply to message #325152] Thu, 05 June 2008 04:32 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If it is a result of EXECUTE QUERY operation, probably nowhere; it is implicitly created as a result of executing a query in a form.

Any other code can be viewed in Forms Builder by selecting "View menu - Show PL/SQL only". Other than that, there might be code in data block property palette (WHERE clause, FROM clause query if FROM statement is data source for this block), etc.
Previous Topic: ALT + 'Key' to excute query
Next Topic: How to Update a column from the other column?
Goto Forum:
  


Current Time: Thu Dec 08 23:54:41 CST 2016

Total time taken to generate the page: 0.13244 seconds