title: Can you force Oracle pl/sql client_host call to be modal?
body: <p>We are using Oracle Forms 10g client_host to copy a file to a temporary location, launch an application to view the temporary file, then delete the temporary file.  In this case the viewing application is Windows Internet Explorer.  The problem is that the delete_file call to delete the temporary file is called before IE can be launched to display the file, resulting in an error in IE because it can't find the file. The following is a code snippet showing what we are doing:</p>
  
  <pre><code>-- Copy the file to the site defined temporary location
  client_host ('cmd /c copy '||Vcurrentfile||' '||Vtempfile);  
  
  -- Launch viewing application and display the temporary file
  client_host (Pviewer||' '||Vtempfile);  
  
  -- Delete the temporary file
  Vsuccessind := webutil_file.delete_file (Vtempfile);
  </code></pre>
  
  <p>Client_host is SUPPOSED to be modal, so the delete_file statement should not be executed until the user closes the IE window.  However, it appears that it is executed before the client_host call to launch the viewer is completed.  Any ideas?</p>