Copy file using oracle forms 6i [message #676189] |
Mon, 20 May 2019 06:58  |
 |
asifcs
Messages: 21 Registered: May 2019 Location: pakistan
|
Junior Member |

|
|
hi guys,
I want to download a file from network location on a client pc using forms 6i. On the same machine where network location exist it works fine. But at client it does't work and display message exist in "if not form_success then" . Below is my code please check and make corrections. thanks.
declare
filename varchar2(500);
filename2 varchar2(500);
v_dest_path varchar2(500);
begin
filename := :admin_attachments.ATTACHED_FILE;
filename2 := substr(filename, (instr(filename,'\',-1,1)+1));
v_dest_path := 'C:\Users\';
if filename2 is not null then --run only when file select
host('cmd /c copy '||filename||' '||v_dest_path||filename2, no_screen);
if not form_success then
message('Error--Can Not copy Check Path.',no_screen);
message('Error--Can Not copy Check Path.',no_screen);
else
Message('File downloaded Successfully. Check Location "C:\Users"'||filename2);
Message('File downloaded Successfully. Check Location "C:\Users"'||filename2);
--Commit_form;
end if;
end if;
End;
*BlackSwan added {code} tags. Please do so yourself in the future.
How to use {code} tags and make your code easier to read
[Updated on: Mon, 20 May 2019 07:17] by Moderator Report message to a moderator
|
|
|
Re: Copy file using oracle forms 6i [message #676191 is a reply to message #676189] |
Mon, 20 May 2019 07:20   |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
asifcs wrote on Mon, 20 May 2019 12:58On the same machine where network location exist it works fine. But at client it does't work
So the client machines can't access the network location?
At the end of the day you need to check what you're passing to host and see if you can run the same command directly on a command prompt on the machine in question.
If you can't you aren't going to get forms to do it.
|
|
|
|