On-error Oracle Forms
Contents |
Download] -menubig/Softwares Blogger Tips [About Blogging] -grip/Blogger%20tips Contact [Enquiry] Fox Main Menu Oracle Forms gridpost/Oracle%20Forms PL/SQL gridpost/PL%2FSQL Linux/Unix gridpost/Linux%2FUnix Softwares gridpost/Softwares Home Alerts D2k Oracle Forms Triggers An Example of On-Error Trigger in Oracle Forms V. Kapoor 1:40 AM A+ A- Print Email how to display error message in oracle forms I wrote this trigger around 4 years ago to handle errors in
How To Display Message In Oracle Forms 10g
an application based on Oracle Forms 6i. This trigger handles all errors with some custom messages for some specific errors
Fnd_message.show In Oracle Forms
and not only this after giving an appropriate message to the user it logs the error into a table named error_log, so that a DBA can view all the errors with their
Oracle Forms Message Popup
execution time, user and program information. See the example below: On-Error Trigger code: declare vabutton number; verrtxt varchar2(80) := error_text; verrno number := error_code; vdbms number := dbms_error_code; verrtype varchar2(20) := error_type; begin if vdbms = -3114 or vdbms = -1017 or vdbms = -3115 or vdbms = -1012 then -- logon related errors set_alert_property('errmes', title, 'App oracle on-error trigger '||ltrim(to_char(vdbms))); set_alert_property('errmes', alert_message_text, 'Logon denied.'); vabutton := show_alert('errmes'); raise form_trigger_failure; end if; if verrno = 41009 OR VERRNO = 41008 or verrno = 40100 OR VERRNO = 40105 then --- ignoring all errors like at first record etc. NULL; elsif verrno = 40509 then insert into error_log (sqno, username, error_msg, error_cd, error_tp, error_dt, LOCATION) values (error_seq.nextval, :MAIN.USERNAME, verrtxt, verrno, verrtype, sysdate, :SYSTEM.CURSOR_BLOCK); frmsave; set_alert_property('errmes', title, 'Info.'||ltrim(to_char(verrno))); set_alert_property('errmes', alert_message_text, 'You cannot update records.'); vabutton := show_alert('errmes'); :main.er := :main.er + 1; else insert into hms.error_log (sqno, username, error_msg, error_cd, error_tp, error_dt, LOCATION) values (hms.error_seq.nextval, :MAIN.USERNAME, verrtxt, verrno, verrtype, sysdate, :SYSTEM.CURSOR_BLOCK); --- frmsave is the database procedure to commit explicitly. frmsave; set_alert_property('errmes', title, 'Info.'||ltrim(to_char(verrno))); set_alert_property('errmes', alert_message_text, verrtxt); vabutton := show_alert('errmes'); :main.er := :main.er + 1; end if; exception when form_trigger_failure then null; when others then -- FOR DEBUG NEXT LINE TO KNOW ERROR NUMBER -- set_alert_property('errmes', alert_message_text, '['||TO_CHAR(ERROR_CODE)||'] '||error_text); insert into error_
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of raise form_trigger_failure this site About Us Learn more about Stack Overflow the company Business Learn frm-40735 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://www.foxinfotech.in/2013/04/on-error-trigger-with-log-oracle-forms.html Forms Suppress Error Message And Catch frm-40350 up vote 2 down vote favorite I have the following code on a button's WHEN-BUTTON-PRESSED trigger BEGIN SYNCHRONIZE; populate_maximo_records; END; There will be a scenario that there will not be any records ti populate in block. If there are no records, currently it is throwing the following error message frm-40350 query caused no records to be retrieved http://stackoverflow.com/questions/22192151/forms-suppress-error-message-and-catch-frm-40350 Instead, I would like to suppress the above message and display a customized message. How can I do this? oracle oracleforms share|improve this question edited Mar 5 '14 at 10:23 asked Mar 5 '14 at 8:19 user75ponic 5,88333116210 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted You can use system.message_level to suppress messages from the system: You have levels of messages: 0, 5, 10, 15, 20, 25, >25 In a trigger, you can specify that only messages above a specified severity level are to be issuedby the form. You do this by assigning a value to the MESSAGE_LEVEL example: declare old_message_level number; begin :old_message_level := :system.message_level; :system.message_level := 20; -- suppresses most errors commit; -- action you want to do without messages or errors :system.message_level := old_message_level; end; If you hold any errors occurring in a variable or in a table you then show your own message after this code by checking your variable if an error has occurred. share|improve this answer answered Mar 5 '14 at 21:52 nightfox79 8121923 How do I check for an error has o
parameters needed. Cause: You pressed [Enter Application Parameters] or [Enter Menu Parameters], but none are required in this context. Action: No action required. Level: 25 Trigger: https://docs.oracle.com/cd/E24269_01/doc.11120/e24477/appd.htm None FRM-10202: Menus are nested too deeply. Cause: You tried to select an item that would nest menus more than 10 deep. Action: Press [Main Menu] to return to the main menu, then http://vambalged2k.blogspot.com/2015/02/on-error-trigger-in-oracle-forms-11g.html navigate to the menu of your choice. Level: 25 Trigger: None FRM-10203: Selected item is not in this menu. Cause: In a full-screen menu, you entered a number that exceeds the maximum number oracle forms of menu items. Action: Choose an item that is on this menu. Level: 25 Trigger: None FRM-10204: No command defined for the selected background item. Cause: You pressed [Background Menu n], where n was greater than the maximum number on the background menu. Action: No action required. Press [Show Background Menu] to see the valid background menu items. Level: 25 Trigger: None FRM-10205: Menu %s not in oracle forms found. Cause: In the choice field of a full-screen menu, you entered a menu name that does not exist in this application or is not found in the library. Action: No action is required if the menu does not exist in the application. If it does, recompile the library. Level: 25 Trigger: None FRM-10206: memory allocation failure Cause: A memory allocation failed when Forms Runtime attempted a menu operation. Action: Try executing the application when the system is less heavily loaded. If the problem persists, contact Oracle Support Services. Level: 25 Trigger: None FRM-10207: No background menu present. Cause: You pressed [Show Background Menu], but no background menu exists. Action: No action required. Level: 25 Trigger: None FRM-10208: Parameter %s not found. Cause: A menu item referenced an undefined parameter. Action: Contact your DBA. Level: 25 Trigger: None FRM-10209: No next menu from background in this context. Cause: The application attempted to navigate to a named menu from the background menu. Action: No action required. Level: 25 Trigger: None FRM-10210: Response required. Cause: You did not enter a required parameter, or you left the choice field blank in a full-screen menu. Action: Make an entry. Lev
On-Error Triggger in Form level :- this is common for all form DECLARE BEGIN IF INSTR(DBMS_ERROR_TEXT, 'ORA-') = 1 AND DBMS_ERROR_CODE <> -1403 THEN frmpkg_export.v_backend_err := 'Y'; ELSIF ERROR_CODE = 40401 OR ERROR_CODE = 40102 OR ERROR_CODE = 40405 OR ERROR_CODE = 41051 THEN NULL; ELSE IF DBMS_ERROR_CODE <> 01403 THEN message(ERROR_TEXT); END IF; END IF; END; Email ThisBlogThis!Share to TwitterShare to Facebook ←Newer Post Older Post→ Home 3 comments: Mathew Stephen27 August 2015 at 03:35There are lots of information about oracle have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get to the next level in oracle. Thanks for sharing this.Oracle Training in Chennai | Oracle Course in Chennai | hadoop training in chennaiReplyDeletekovalan Jayamurugan16 October 2015 at 04:32Thanks for your informative article on ios mobile application development. Your article helped me to explore the future of mobile apps developers. Having sound knowledge on mobile application development will help you to float in mobile application development. iOS Training in Chennai | iOS Training Institutes in ChennaiReplyDeleteNikshitha S23 June 2016 at 04:47Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. SAS Training in Chennai | SAS Course in Chennai ReplyDeleteAdd commentLoad more... Subscribe to: Post Comments (Atom) Funny Things to Ponder Copyright © SQL, PL/SQL and ORACLE D2K(FORMS AND REPORTS) collections By Vishal Ambalge | Powered by BloggerDesign by N.Design Studio | Blogger Theme by NewBloggerThemes.com Categories Oracle (16) PL_SQL (12) SQL (3) Popular Posts PL/SQL code for FACTORIAL OF A NUMBER pl/sql program to finding factorial of given number. Procedure: declare i number(4):=1; n number(4):=&n; f... PL/SQL code to check given number is EVEN OR ODD pl/sql program to find given number is even or odd. Procedure: Declare n number(4):=&n; Begin if mod(n,2)=0 then... PL/SQL code for PRIME NUMBER pl/sql program to check weather