No video

oracle apex Error Handling (Arabic)

  Рет қаралды 5,282

ali saleh ali

ali saleh ali

Күн бұрын

apex error handling

Пікірлер: 31
@khalidatta746
@khalidatta746 7 жыл бұрын
شكرا يا هندسة .. ربنا يزيدك علم ..
@alisaleh84
@alisaleh84 7 жыл бұрын
متشكر جدا
@alisaleh84
@alisaleh84 5 жыл бұрын
www.udemy.com/course/full-track-be-oracle-apex-developer/?couponCode=ARABIC_APEX
@alisaleh84
@alisaleh84 7 жыл бұрын
APEX_ERROR_HANDLING_EXAMPLE _____________________________ 1-function ___________________ create or replace FUNCTION "APEX_ERROR_HANDLING_EXAMPLE" ( p_error in apex_error.t_error ) return apex_error.t_error_result is l_result apex_error.t_error_result; l_reference_id number; l_constraint_name varchar2(255); begin l_result := apex_error.init_error_result ( p_error => p_error ); -- If it's an internal error raised by APEX, like an invalid statement or -- code which can't be executed, the error text might contain security sensitive -- information. To avoid this security problem we can rewrite the error to -- a generic error message and log the original error message for further -- investigation by the help desk. if p_error.is_internal_error then -- Access Denied errors raised by application or page authorization should -- still show up with the original error message if p_error.apex_error_code 'APEX.AUTHORIZATION.ACCESS_DENIED' then -- log error for example with an autonomous transaction and return -- l_reference_id as reference# -- l_reference_id := log_error ( -- p_error => p_error ); -- -- Change the message to the generic error message which doesn't expose -- any sensitive information. l_result.message := 'An unexpected internal application error has occurred. '|| 'Please get in contact with XXX and provide '|| 'reference# '||to_char(l_reference_id, '999G999G999G990')|| ' for further investigation.'; l_result.additional_info := null; end if; else -- Always show the error as inline error -- Note: If you have created manual tabular forms (using the package -- apex_item/htmldb_item in the SQL statement) you should still -- use "On error page" on that pages to avoid loosing entered data l_result.display_location := case when l_result.display_location = apex_error.c_on_error_page then apex_error.c_inline_in_notification else l_result.display_location end; -- If it's a constraint violation like -- -- -) ORA-00001: unique constraint violated -- -) ORA-02091: transaction rolled back (-> can hide a deferred constraint) -- -) ORA-02290: check constraint violated -- -) ORA-02291: integrity constraint violated - parent key not found -- -) ORA-02292: integrity constraint violated - child record found -- -- we try to get a friendly error message from our constraint lookup configuration. -- If we don't find the constraint in our lookup table we fallback to -- the original ORA error message. if p_error.ora_sqlcode in (-1, -2091, -2290, -2291, -2292) then l_constraint_name := apex_error.extract_constraint_name ( p_error => p_error ); begin select message into l_result.message from constraint_lookup where constraint_name = l_constraint_name; exception when no_data_found then null; -- not every constraint has to be in our lookup table end; end if; -- If an ORA error has been raised, for example a raise_application_error(-20xxx, '...') -- in a table trigger or in a PL/SQL package called by a process and we -- haven't found the error in our lookup table, then we just want to see -- the actual error text and not the full error stack with all the ORA error numbers. if p_error.ora_sqlcode is not null and l_result.message = p_error.message then l_result.message := apex_error.get_first_ora_error_text ( p_error => p_error ); end if; -- If no associated page item/tabular form column has been set, we can use -- apex_error.auto_set_associated_item to automatically guess the affected -- error field by examine the ORA error for constraint names or column names. if l_result.page_item_name is null and l_result.column_alias is null then apex_error.auto_set_associated_item ( p_error => p_error, p_error_result => l_result ); end if; end if; return l_result; end apex_error_handling_example; ____________________ 2- table ___________ CREATE TABLE "CONSTRAINT_LOOKUP" ( "CONSTRAINT_NAME" VARCHAR2(30), "MESSAGE" VARCHAR2(4000) NOT NULL ENABLE, PRIMARY KEY ("CONSTRAINT_NAME") ENABLE ) ________________
@zuhairabdullahfadhel8432
@zuhairabdullahfadhel8432 3 жыл бұрын
شكرا ياباشا وبارك الله فيك وجزاك كل خير
@alisaleh84
@alisaleh84 3 жыл бұрын
@@zuhairabdullahfadhel8432 شكر لذوق حضرتك تابع احدث كورساتى من هنا www.udemy.com/course/full-track-be-oracle-apex-developer/?referralCode=FF289BAA30C6C18C8540
@samirarem8786
@samirarem8786 7 жыл бұрын
Thanks ! 'Allah Yjazik Khair' for your valuable help
@alisaleh84
@alisaleh84 7 жыл бұрын
Thanks
@alisaleh84
@alisaleh84 5 жыл бұрын
www.udemy.com/course/full-track-be-oracle-apex-developer/?couponCode=ARABIC_APEX
@igordj4884
@igordj4884 3 жыл бұрын
GREAT!"!!!! THANKS A LOT!!!!
@douglasantoniomenjivarzamo5824
@douglasantoniomenjivarzamo5824 3 жыл бұрын
Now I have a query, from a process I invoke a procedure of a package when pressing a button on the form, what the procedure does is insert records to a table and then in APEX I have a branch that takes me to a new page where I show the results in an interactive report. The process starts normal but when it takes a few minutes the cursor process circle stops appearing and the cursor arrow appears as I have finished, but I go to the sql developer to consult the table and the data is not there yet, in the course of about 10 minutes the data appears. I need the process to finish and run the branch to see the results in the interactive report on the other page then it doesn't branch me after processing to load the page with the results. What are you suggesting?
@alisaleh84
@alisaleh84 3 жыл бұрын
try to add log in every step to get where the error exactly
@esamgamal2750
@esamgamal2750 5 жыл бұрын
هل ممكن ارسال function ، لاني احتاجها ضروري
@alisaleh84
@alisaleh84 5 жыл бұрын
APEX_ERROR_HANDLING_EXAMPLE ___________________________ 1-function _________________ create or replace FUNCTION "APEX_ERROR_HANDLING_EXAMPLE" ( p_error in apex_error.t_error ) return apex_error.t_error_result is l_result apex_error.t_error_result; l_reference_id number; l_constraint_name varchar2(255); begin l_result := apex_error.init_error_result ( p_error => p_error ); -- If it's an internal error raised by APEX, like an invalid statement or -- code which can't be executed, the error text might contain security sensitive -- information. To avoid this security problem we can rewrite the error to -- a generic error message and log the original error message for further -- investigation by the help desk. if p_error.is_internal_error then -- Access Denied errors raised by application or page authorization should -- still show up with the original error message if p_error.apex_error_code 'APEX.AUTHORIZATION.ACCESS_DENIED' then -- log error for example with an autonomous transaction and return -- l_reference_id as reference# -- l_reference_id := log_error ( -- p_error => p_error ); -- -- Change the message to the generic error message which doesn't expose -- any sensitive information. l_result.message := 'An unexpected internal application error has occurred. '|| 'Please get in contact with XXX and provide '|| 'reference# '||to_char(l_reference_id, '999G999G999G990')|| ' for further investigation.'; l_result.additional_info := null; end if; else -- Always show the error as inline error -- Note: If you have created manual tabular forms (using the package -- apex_item/htmldb_item in the SQL statement) you should still -- use "On error page" on that pages to avoid loosing entered data l_result.display_location := case when l_result.display_location = apex_error.c_on_error_page then apex_error.c_inline_in_notification else l_result.display_location end; -- If it's a constraint violation like -- -- -) ORA-00001: unique constraint violated -- -) ORA-02091: transaction rolled back (-> can hide a deferred constraint) -- -) ORA-02290: check constraint violated -- -) ORA-02291: integrity constraint violated - parent key not found -- -) ORA-02292: integrity constraint violated - child record found -- -- we try to get a friendly error message from our constraint lookup configuration. -- If we don't find the constraint in our lookup table we fallback to -- the original ORA error message. if p_error.ora_sqlcode in (-1, -2091, -2290, -2291, -2292) then l_constraint_name := apex_error.extract_constraint_name ( p_error => p_error ); begin select message into l_result.message from constraint_lookup where constraint_name = l_constraint_name; exception when no_data_found then null; -- not every constraint has to be in our lookup table end; end if; -- If an ORA error has been raised, for example a raise_application_error(-20xxx, '...') -- in a table trigger or in a PL/SQL package called by a process and we -- haven't found the error in our lookup table, then we just want to see -- the actual error text and not the full error stack with all the ORA error numbers. if p_error.ora_sqlcode is not null and l_result.message = p_error.message then l_result.message := apex_error.get_first_ora_error_text ( p_error => p_error ); end if; -- If no associated page item/tabular form column has been set, we can use -- apex_error.auto_set_associated_item to automatically guess the affected -- error field by examine the ORA error for constraint names or column names. if l_result.page_item_name is null and l_result.column_alias is null then apex_error.auto_set_associated_item ( p_error => p_error, p_error_result => l_result ); end if; end if; return l_result; end apex_error_handling_example; __________________ 2- table _________ CREATE TABLE "CONSTRAINT_LOOKUP" ( "CONSTRAINT_NAME" VARCHAR2(30), "MESSAGE" VARCHAR2(4000) NOT NULL ENABLE, PRIMARY KEY ("CONSTRAINT_NAME") ENABLE ) ______________
@ahmadkaremm3921
@ahmadkaremm3921 6 жыл бұрын
السلام عليكم هل يجب ان اعرف apex_error.t_error لانه يعطيني رسالة خطا عند انشاء الدالة
@alisaleh84
@alisaleh84 6 жыл бұрын
لا ليس شرط ممكن تبعت صوره من الخطأ
@ahmadkaremm3921
@ahmadkaremm3921 6 жыл бұрын
اناعندي apex 4.2 وقمت بانشاء الدالة من toad تحت ال schema الخاص بتطبيق بتاعي
@ahmadkaremm3921
@ahmadkaremm3921 6 жыл бұрын
PLS-00201: identifier 'APEX_ERROR.T_ERROR' must be declared
@alisaleh84
@alisaleh84 6 жыл бұрын
حاول تنفذه من جوه الابكس
@ahmadkaremm3921
@ahmadkaremm3921 6 жыл бұрын
شكرا على الرد حتى اني لم اجد بصفحة ال definition hanler error function من اجل اختيار التابع فقط يوجد مكان اظهار ال error بالصفحة
@maiankithun
@maiankithun 6 жыл бұрын
good job dude. Just one doubt. it is not working in upload wizard
@alisaleh84
@alisaleh84 6 жыл бұрын
Ok brother i will test it
@Mhmsami07
@Mhmsami07 4 жыл бұрын
Thanks for your effort but sometimes constraint name didn't return with Apex_Error.extract_constraint_name ??
@alisaleh84
@alisaleh84 4 жыл бұрын
Like what Check constraint name and type
@alisaleh84
@alisaleh84 4 жыл бұрын
full course from here www.udemy.com/course/full-track-be-oracle-apex-developer/?couponCode=APEX_5
@Mhmsami07
@Mhmsami07 4 жыл бұрын
@@alisaleh84 like check contraint for value is not null Example employees has check contraint of last name must be not null I added the name of constraint in table of lookup. I traced the value of variable l_constraint_name i noticed that this variable is null but i don't know why!! Thanks in advance
@alisaleh84
@alisaleh84 4 жыл бұрын
@@Mhmsami07 first not null it can done direct from app second check that constraint type not null is existed in function
Use Error Handling Function to change Constraint Error Message
7:59
ali saleh ali
Рет қаралды 3,7 М.
APEX Instant Tips #22 - APEX Error Handling
11:28
Insum
Рет қаралды 3,9 М.
Touching Act of Kindness Brings Hope to the Homeless #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 17 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 46 МЛН
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 11 МЛН
Error Handling
4:44
Ontoor Solutions
Рет қаралды 227
Oracle APEX Report Development Using Standard Functionality
17:29
How to open URL saved in DB in Oracle APEX
6:20
Weili Liu
Рет қаралды 900
Custom Authentication and Authorization using ORACLE APEX
15:27
SOFTWARE AND WEBSITE
Рет қаралды 27 М.
Custom Message | Success | Alert | Error |  Oracle APEX
1:51
Oracle APEX BD
Рет қаралды 11 М.
Oracle APEX Validation
18:38
CodeWithSaurav
Рет қаралды 9 М.
computation in oracle apex
7:00
Najeeb Khan
Рет қаралды 986
Touching Act of Kindness Brings Hope to the Homeless #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 17 МЛН