Copy file using oracle forms 6i [message #676189] |
Mon, 20 May 2019 06:58 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/06550b5b1ba5075f8a939a771a8fa811?s=64&d=mm&r=g) |
asifcs
Messages: 21 Registered: May 2019 Location: pakistan
|
Junior Member |
![asifghumancs@gmail.com](/forum/theme/orafaq/images/google.png)
|
|
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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 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.
|
|
|
|