How to know when the Excel file has been generated? [message #175562] |
Fri, 02 June 2006 16:35  |
orate
Messages: 16 Registered: September 2005
|
Junior Member |
|
|
I have a form with the following code, which executes an .sql file containing an sql query and puts the result in an Excel file:
in_file := TEXT_IO.FOPEN('c:\query.sql', 'w');
TEXT_IO.PUT_LINE(in_file, 'SPOOL c:\result.csv');
TEXT_IO.PUT_LINE(in_file, the_query);
TEXT_IO.PUT_LINE(in_file, '/');
TEXT_IO.PUT_LINE(in_file, 'SPOOL OFF');
TEXT_IO.PUT_LINE(in_file, 'EXIT');
TEXT_IO.FCLOSE(in_file);
HOST(path_of_sqlplus_executable||' '||GET_APPLICATION_PROPERTY(USERNAME)||'/'||GET_APPLICATION_PROPERTY(PASSWORD)||'@'||GET_APPLICATION_PROPERTY(CONNECT_STRING)||'@c:\q uery.sql', NO_SCREEN);
This can take some time, so I want to show an alert when SQL*PLUS exits, telling the user that the Excel file has been created.
How can I know when this happens?
|
|
|
|
|
|