Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-20876: Stop APEX Engine

APEX4EBSJan 12 2023

APEX : 20.2
I am using a modal dialog, with a single button. When I click on a button I would like to perform an apex_data_export.export.
A page process has been created when the button is pressed
The export seems work correctly and a CSV file is created with the correct contents. However, I get an error "ORA-20876: Stop APEX Engine"
l_context apex_exec.t_context;
l_export apex_data_export.t_export;
v_SQL varchar2(32000);
begin
v_sql := 'select * from emp';
l_context := apex_exec.open_query_context(
p_location => apex_exec.c_location_local_db,
p_sql_query => v_sql );
l_export := apex_data_export.export (
p_context => l_context,
p_format => apex_data_export.c_format_csv,
p_file_name => 'xxxx' );
apex_exec.close( l_context );
apex_data_export.download(p_export => l_export, p_stop_apex_engine => true);
EXCEPTION
when others THEN
apex_exec.close( l_context );
insert into err_tab(message) values (SQLERRM);

What is causing the error message to occur and how can I stop it from occurring.
If I change p_stop_apex_engine => false, the CSV file is not created.
Thanks

This post has been answered by Carsten Czarski-Oracle on Jan 12 2023
Jump to Answer
Comments
Post Details
Added on Jan 12 2023
1 comment
1,647 views