tag:blogger.com,1999:blog-2132893136140848212.post9118556214060933737..comments2023-09-09T03:03:30.219-06:00Comments on Martin Giffy D'Souza on Oracle APEX: apex_application.stop_apex_engineMartin D'Souzahttp://www.blogger.com/profile/06992954599899886499noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-2132893136140848212.post-90760191225727846192016-07-03T19:24:35.535-06:002016-07-03T19:24:35.535-06:00Superseded in 5.0 by apex_util.redirect_url http:/...Superseded in 5.0 by apex_util.redirect_url http://docs.oracle.com/cd/E59726_01/doc.50/e39149/apex_util.htm#AEAPI2324Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-18968835940455380562016-02-15T20:18:41.284-07:002016-02-15T20:18:41.284-07:00Stoping APEX aside, I don't think you can do w...Stoping APEX aside, I don't think you can do what you want to do. When you download a file you can only download one file. What you probably need to do is zip your multiple files before calling your download_file function. APEX 5 has a zip function for that: https://docs.oracle.com/cd/E59726_01/doc.50/e39149/apex_zip.htm#BABHECBDMartin D'Souzahttps://www.blogger.com/profile/06992954599899886499noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-3509491516596609842016-02-01T02:27:23.628-07:002016-02-01T02:27:23.628-07:00Thank you very much, the article helped me a lot! ...Thank you very much, the article helped me a lot! But I still have some problems... The matter is I need to load several files from one process (checking several rows in a table, then loading each one into a separate file), the process is:<br /><br />BEGIN<br /> FOR I IN 1 .. APEX_APPLICATION.G_F01.COUNT<br /> LOOP<br /> cher_sp.load_ndfl6.download_file(TO_NUMBER(APEX_APPLICATION.G_F01(i)));<br /> END LOOP;<br />END; <br /><br />and the code in cher_sp.load_ndfl6.download_file:<br />...<br />htp.init;<br />owa_util.mime_header('text/xml', false ); <br />htp.p( 'Content-Length: ' || dbms_lob.getlength( myfile ) ); <br />htp.p( 'Content-disposition: attachment; filename="'||c0.filename||'.xml";' ); <br />owa_util.http_header_close;<br />wpg_docload.download_file(myfile);<br />htmldb_application.g_unrecoverable_error := true;<br />--apex_application.stop_apex_engine; <br />...<br /><br />With stop_apex_engine only the first file is loaded, with g_unrecoverable_error - only the last. Help me, please, what should I do with it?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-1902967274335864552013-06-03T10:10:25.001-06:002013-06-03T10:10:25.001-06:00No, just your session/page load.No, just your session/page load.Martin D'Souzahttps://www.blogger.com/profile/06992954599899886499noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-50559809537369629132013-05-17T10:30:54.465-06:002013-05-17T10:30:54.465-06:00 I wonder if I call apex_application.stop_apex_e... I wonder if I call apex_application.stop_apex_engine to execute wpg_docload.download_file in order to download RTF file, would it affects other users to use that APEX application?<br /><br />SamAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-32918661942959784632013-04-05T18:21:20.659-06:002013-04-05T18:21:20.659-06:00Thanks for your input. I've included your comm...Thanks for your input. I've included your comments in the article itself since I want to ensure readers are aware of it.Martin D'Souzahttps://www.blogger.com/profile/06992954599899886499noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-4615152047700161792012-10-04T07:51:58.653-06:002012-10-04T07:51:58.653-06:00There appear to be a couple gotchas with simply re...There appear to be a couple gotchas with simply replacing g_unrecoverable_error with stop_apex_engine.<br /><br />1. If there is any PL/SQL code immediately following the g_unrecoverable_error it will still be executed. It looks like stop_apex_engine actually exits out of the routine.<br /><br />2. It looks like stop_apex_engine will roll back any SQL inserts/updates/deletes that occur in the routine, where as g_unrecoverable_error allow them to be committed.Jason Longnoreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-17972941972557260472012-04-19T07:13:44.206-06:002012-04-19T07:13:44.206-06:00An issue I have encountered:
https://forums.oracl...An issue I have encountered:<br /><br />https://forums.oracle.com/forums/thread.jspa?threadID=2377957Louis-Guillaumehttps://www.blogger.com/profile/06491876959467764686noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-44053897692085765082011-12-17T10:48:25.579-07:002011-12-17T10:48:25.579-07:00When redirecting to a new page the rest of the pag...When redirecting to a new page the rest of the page is still processed. I demoed this in the Ask the ClariFit Experts webinar (check http://presentations.clarifit.com in a few days for the video).<br /><br />Regarding the old method, I think it may work for a while. It was an undocumented feature so I'm not sure how long the APEX team will keep supporting it.<br /><br />MartinMartin D'Souzahttps://www.blogger.com/profile/06992954599899886499noreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-67689191001147078312011-12-05T17:17:45.900-07:002011-12-05T17:17:45.900-07:00"you should go back and upgrade to the new pr..."you should go back and upgrade to the new procedure." - is it not still provided for the likely many applications that have used this call?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2132893136140848212.post-11096164247191748702011-12-05T10:02:16.448-07:002011-12-05T10:02:16.448-07:00When redirecting from a page isn't the page st...When redirecting from a page isn't the page stopped from processing automatically?<br /><br />Raoulraoulhttp://www.mraoul.comnoreply@blogger.com