Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Webutil usage on Windows and Unix clients - Host and Temp dir issues

31625Oct 27 2004 — edited Oct 27 2004
Hello,

I am in the process of writing a Forms application which makes use of WebUtil to handle the uploading and downloading of files, as well as launching the files on the client PCs. The code below is my current 'Launch' program which works great in a Microsoft Windows environment. It gets the TEMP directory location, builds a file name, downloads the file to the TEMP directory and uses the Host command to launch the file.

PROCEDURE Launch_DB IS

l_directory varchar2(200) := client_win_api_environment.get_temp_directory(true);
l_success boolean;

BEGIN

:file_block.full_file_name := l_directory || '\' || :file_block.file_name;

l_success := webutil_file_transfer.DB_To_Client_with_progress
(clientFile => :file_block.full_file_name
,tableName => 'FILES
,columnName => 'FILE_DATA'
,whereClause => 'ID = ' || :file_block.id
,progressTitle => 'Download from Database in progress'
,progressSubTitle=> 'Please wait'
);

if l_success then
WEBUTIL_HOST.NONBLOCKING('CMD /C "' || :file_block.full_file_name || '"');
else

exception
when others then
message('File download failed: '||sqlerrm);

END;


My problem is that I've just discovered that there's a new group of users that will want access to these forms, and they're using non-windows machines - mostly Solaris and Linux. As such, I have these problems:
- " client_win_api_environment.get_temp_directory " is a Microsoft Windows specific function. Is there any way to determine a temporary storage area on a Unix machine?
- " WEBUTIL_HOST.NONBLOCKING('CMD /C "' || :file_block.full_file_name || '"'); " - CMD is Microsoft Windows specific function. What should I do to launch a file from Unix? (Sorry, my Unix skills are pretty minimal).
- I'm guessing that I'll need to determine the operating system so that I can use different methods to determine the TEMP dir, and to execute the HOST command. Assuming that Microsoft Windows and Unix variants are the only OS's that I need to provide access to, what is the best way to determine the client environment ( eg. IF UPPER(WebUtil_ClientInfo.Get_Operating_System) like '%WINDOWS%' THEN ... ELSE ... END IF; ) . I only have access to Windows XP for testing so I don't know what values "WebUtil_ClientInfo.Get_Operating_System" will return for any other OS.

Thanks in advance for any assistance.
Regards,
Michael.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2004
Added on Oct 27 2004
1 comment
622 views