When I run the following code, I see the correct results in l_context, but nothing downloads. What am I missing? How can I troubleshoot this since there are no errors?
<code> l_context := apex_exec.open_query_context(
p_location => apex_exec.c_location_local_db,
p_sql_query => 'select output from TFA_USER',
p_where_clause => :P0_SUB );
l_export := apex_data_export.export (
p_context => l_context,
p_format => apex_data_export.c_format_json,
p_file_name => 'test' );
apex_exec.close( l_context );
apex_data_export.download( p_export => l_export );
EXCEPTION
when others THEN
apex_exec.close( l_context );
raise;
DBMS_OUTPUT.put_line(l_context);
APEX_JSON.free_output;
end;
</code>
<code> l_context := apex_exec.open_query_context(
p_location => apex_exec.c_location_local_db,
p_sql_query => 'select output from TFA_USER',
p_where_clause => :P0_SUB );
l_export := apex_data_export.export (
p_context => l_context,
p_format => apex_data_export.c_format_json,
p_file_name => 'test' );
apex_exec.close( l_context );
apex_data_export.download( p_export => l_export );
EXCEPTION
when others THEN
apex_exec.close( l_context );
raise;
DBMS_OUTPUT.put_line(l_context);
APEX_JSON.free_output;
end;
</code>
l_context := apex_exec.open_query_context(
p_location => apex_exec.c_location_local_db,
p_sql_query => 'select output from TFA_USER',
p_where_clause => :P0_SUB );
l_export := apex_data_export.export (
p_context => l_context,
p_format => apex_data_export.c_format_json,
p_file_name => 'test' );
apex_exec.close( l_context );
apex_data_export.download( p_export => l_export );
EXCEPTION
when others THEN
apex_exec.close( l_context );
raise;
DBMS_OUTPUT.put_line(l_context);
APEX_JSON.free_output;
end;
5