Deleting a uploaded file from server [message #478632] |
Mon, 11 October 2010 06:15 |
|
deepakmannazhi
Messages: 137 Registered: February 2010 Location: Dubai, UAE
|
Senior Member |
|
|
Dear All,
We uploaded files to application server,using
webutil_file_transfer.client_to_as_with_progress
Now, we want to delete the file through forms, when user click a button.
we tried this,using HOST command.
DECLARE
CURSOR c_path
IS
SELECT attachpath
FROM PATHTAB
WHERE apid = :parameter.apid;
file_name VARCHAR2 (500);
v_path VARCHAR2 (200);
v_name VARCHAR2 (1000);
v_doc VARCHAR2 (10);
v_grn VARCHAR2 (30);
BEGIN
IF :STSHPADV3.filename IS NULL
THEN
IF common.raise_alert ('NOTE', 'File Not Uploaded..! ')
THEN
NULL;
END IF;
ELSE
OPEN c_path;
FETCH c_path INTO v_path;
CLOSE c_path;
v_name := v_path || '\' || :STSHPADV3.filename;
IF common.raise_alert (
'CAUTION',
'Do you want to Delete ' || :STSHPADV3.filename || ' ...? ')
THEN
HOST ('DEL v_name', NO_PROMPT);
IF common.raise_alert ('NOTE', 'File Deleted Successfully...! ')
THEN
NULL;
END IF;
END IF;
END IF;
END;
But not working,
please suggest a solution.
Thanks and Regards
Deepak
[EDITED by LF: code reformatted; applied [code] tags to preserve formatting]
[Updated on: Mon, 11 October 2010 06:55] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|