Webutil_host command
Hi,
I want to achieve the following using webutil:
Download a pdf file stored as blob in database via db_to_client_with_progress and save it on the client using File_save_dialog. This works o.k.
myfilename := webutil_file.file_save_dialog('c:\',null,'PDF|*.pdf','Save attachment...');
r_download :=webutil_file_transfer.db_to_client_with_progress(myfilename,'SEMATT','DOCUMENT','id = '||:sematt.id,'Downloading...','File download in progress...');
This works, and I can open that file manually using acrobat reader.
Now I want to open the pdf file using webutil_host.host command:
webutil_host.host(myfilename);
This does not work. Even
webutil_host.host('acrord32 '||myfilename);
does not work.
Any help is appreciated!
Thanks
Gerald Krieger
Is the important part of this process the download or the open? Because you could open the PDF from the server using web.show_document. But if you do want to call it from the client then you need to use CMD in the WEBUTIL_HOST call - something like CLIENT_HOST('cmd /c acrord32 '||myfilename);
Cheers, APC
Similar Messages
-
Webutil_host closing command prompt
I am using this command in my form:
webutil_host.nonblocking('cmd /c "' || v_file_name || '" && exit');
I want to be able to open the WORD/PDF/EXCEL, etc.
file and close the Command Prompt as well.
Currently, the document will display properly but the
command prompt window will stay there until the user
exits the document. I want the command prompt window
to disappear (or hide) as soon as the document opens.
Is this possible?You could try
webutil_host.nonblocking('cmd /c start "' || v_file_name || '" "' || v_file_name || '"' );
It will not work if client uses Windows 95/98/ME. -
Opening a file using Webutil_Host.Host Command
Dear Gurus
I'm trying to open a file using following command behind a button on my form:
Webutil_Host.Host('x:\03\03\39920000023.gif');
I expected from this command to open the given gif file in default image viewer but it takes no action when I press the push button. So should I try something else???try this
Webutil_host command -
Webutil_host.nonblocking PROBLEM
Good afternoon,
The webutil_host.nonblocking command works fine to open most documents BUT when trying to open a document that has spaces in the filename (example: hello there.doc) it doesn't work?? Does anyone have a suggestion other than renaming the document?
webutil_host.nonblocking('cmd /c '||p_dir_path||p_file_name);
Thanks,
Terry SicardHi
WebUtil has trouble with white space , but If you use the "?? character in palce of white space it will work:
fileName := replace(fileName,' ' ,'?'); -
Webutil_host.blocking is not working when an existing Chrome browser is already open
Hi Everyone,
I've a small issue which I would like to share with you and hopefully you might have come across this problems before and assist me to resolve it.
The problem is I'm using Oracle Forms [32 Bit] Version 11.1.2.0.0 (Production) version and in one of the Form's button I'm calling an external API to display the image in a Chrome browser and once it completes, it would return control back to the Oracle Form. In the ideal situation where there isn't any existing Chrome browser opened, the logic would work perfectly as I was using the webutil_host.blocking command that block Form processing until the Chrome browser is terminated. However, as soon as I have one or more existing Chrome browsers open, I was still able to call the external API to display the image but the locking or blocking of the Oracle Form would not work. By the way, all clients accessing the oracle Forms are using Window 7. Is that a solution for that? Is that a Chrome, OS or/and WebUtil issue? Thank you for your assistance and time.
Regards,
JohnHello,
does anyone have any thoughts on this or a workaround?
We use the blocking feature to allow the user to make changes to the document and then restore those changes to the database. Without this feature the code falls through and breaks the link between the document and the forms application.
appreciate all help
Jim -
Webutil_host.blocking( ) example needed * SOLVED *
Hello, I need to get the name of the UNIX application server from my forms 10g program. I'm calling pid := webutil_host.blocking('uname -n') but it fails with a return code of 2 no matter how I format the command ('ksh -c "uname -n"', etc). subsequent calls to outp := webutil_host.get_standard_output(pid) or outp := webutil_host.get_standard_error(pid) don't seem to work either as trying to display outp(0), etc display nothing.
webutil functionality is not being called in pre-form or when-new-form-instance (before webutil is instantiated).
Can anyone point me to a working example of getting output from a UNIX command?
Thanks,
GaryOk, here's how I did it, turned out to be pretty simple:
FUNCTION get_oas_name RETURN varchar2 IS
fp text_io.file_type;
output varchar2(30);
BEGIN
host('/bin/uname -n > /tmp/oasname');
fp := text_io.fopen('/tmp/oasname','r');
text_io.get_line(fp, output);
text_io.fclose(fp);
return output;
END;Gary -
WEBUTIL_HOST.HOST
Dear all experts,
I have a form which make use of the WEBUTIL_HOST.HOST command to call up a VB application, it is successfully done. However, the VB apps need to be closed before the focus can go back to the Forms application.
My question is : Can I start up the VB apps and then go back to the Forms apps without closing the VB apps ? This is because the user need to switch between both apps to do their work. Can this be done ?
Thanks a lot !do u need to share the data between these application in the same session?
If not use an open_form to open the form containing the java bean. Then u will be able to switch between these 2.
Best Regards
Rajesh Alex -
Hello!
Can i run the host command by WEBUTIL_HOST without promt window opening?
And can i pass parameters to my java code that i run form WEBUTIL_HOST?
Thanks!1. No, but you can use a JavaBean for this purpose.
2.
"And can i pass parameters to my java code that i run form WEBUTIL_HOST"
What java code?
Francois -
WEBUTIL_HOST.blocking and winword 2003
Hi all,
I got some problems using webutil_host and winword 2003.
As i open a document with winword in blocking mode, works well if word is not already open.
Eg if word is already open it dunot do the blocking stuff, and go back to forms immediatly.
here is the code :
LC$Cmd := 'cmd /c start "" /WAIT "winword.exe'||'" '|| Path_vima;
Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
fms_message('back from call');
LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
If LN$But <> 0 Then
Set_Alert_Property( 'AL_ERREUR', TITLE, 'Host() command' ) ;
End if ;
So if winword is not open on client -> it works well
if winword already open -> it dunot block and display fms_message('back from call');
Plz Help :)
Thanks
PS : this work perfectly with Excel ....Ok seems that dunot work even if not using forms.
as launch a cmd like cmd /c start /WAIT winword
it wait the close of winword to continue execution
but if i launch winword first and than try a
cmd /c start /WAIT winword
it open a second winword but dunot wait for word to be close.....
that's to bad .
I'll try look at MS forum -
WEBUTIL_HOST Function not works with Batchfiles
Hi
I try to call the WEBUTIL_HOST.host('c:\test.bat')
Function from Forms9i.
she’s don't work.
The DosBox hanging on without error
can help me somewhere?
Thanks Alfredsorry, sorry it works ;-)
Forms has write the result of the DIR command to the server
the right code is
dir > c:\text.txt
with the next step i have a Problem
when i use the command PAUSE in the betchfile
test.bat:
echo on
pause
dir > c:\test.txt
webutil_host.host('cmd /c c:\test.bat');
The CMD-Box hangs on
reg. Alfred -
Webutil_host.host problems (bugs???)
Hi,
I'm using the webutil_host.host(commandline) command to execute batchfiles on a client pc. These batch files are also echoing messages to the screen. In the client server version, when I use the host command, the messages appear in my ms-dos box. With webutil they don't.
The same goes for the pause command in a batch file. When there is a pause command in the batch file to give the user the possibility to read the messages on the screen and wait for user interaction, the ms-dos box doesn't respond on my key-stroke. I have to close the ms-dos window by clicking on the upperrightcorner cross.
imo this is unwanted.... Is there a workaround? Or do I have to live with the fact that webutil_host.host != hosti'm using the webutil host command to execute batch files on the client pc. One function of these batch files is to start SQL*loader to read data-files on the client-pc. This is the core of the application, since the data in the datafiles is the base of the rest of the process.
Because this is such an important part it is decided to give outputs to the ms-dos console and put pauses in the batchfile, so the process of reading the data-files can be evaluated.
Since this is a migration traject (moving from c/s to web) my customer doesn't want any functional changes (like outputs to logfiles instead of ms-dos window). -
Webutil_host or client_host delete all files...
I am trying to delete files within a directory on a client's machine through my forms 9i web application and it's not working???
I tried
client_host('cmd c/ DEL c:\gdocdocs\');
client_host('cmd c/ DEL /F c:\gdocdocs');
webutil_host.nonblocking('cmd c/ c:\gdocdocs\');
webutil_host.nonblocking('cmd c/ DEL c:\gdocdocs\');
Thanks,
Terry SicardIMHO For Windows 2000, the command should be
cmd /c DEL /Q c:\gdocdocs\*.*
/Q - Quiet mode, do not ask if ok to delete on global wildcard
You could also try:
echo Y | del c:\gdocdocs\*.* -
Webutil_host very slow first time.
I use a very simple comand
WEBUTIL_HOST.NONBLOCKING(COMANDO)
where COMANDO is
COMANDO := 'CMD /C "'||FILE_NAME||'"' ;
and FILE_NAME contains the name of a .xls Excell file.
It works fine but first time I execute it it takes more than 5 minutes to open the Excell file.
From the second on it appears after 20 secs.
I tried to open Excel by hands before I execute the command but nothing changed.
How can I solve that issue ?
Tks
TullioCan you explain what you mean by this statement:
I tried to open Excel by hands before I execute the command but nothing changedWhat do you mean by hand? Do you mean you try opening the file using excel application on client machine? If so, how fast did it load first time on client machine? -
hi dear all
after searching a lot.. now posting a problem
my problem = Linux client not running client_host command , no error in console , no other sound
i created character base report printing form. that first generate filename.txt out put from report then print to any network printer which selected by user.
server = windows 2003 with oracle 10g forms and reports server
client1 = windows XP
webutil client info working fine
form run following command
client_host('cmd /c copy jobid0866.txt \\computer_name\printer_share');
working fine
client2 = Linux Mint
webutil client info working fine
form run following command
client_host('/bin/smbclient //computer_name/printer_share password -U username -c 'print /home/user_name/Downloads/jobid0866.txt' ');
actual command in form for further elaborate
WEBUTIL_HOST.NONBLOCKING('/bin/ smbclient '||:PRINTER_NAME||' printer -U printer -c '||chr(39)||'print home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||chr(39));
not working with no warning, no error
Edited by: mhpinger on Jan 27, 2012 3:40 AMserver windows 2003 with oracle application 10g
client linux mint
working
cmd_string := '/bin/cp /home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||' '||'/home/'||:global.client_user||'/Downloads/result.txt';
webutil_host.blocking(cmd_string);
not working
cmd_string := '/bin/smbclient '||:PRINTER_NAME||' printer -U printer -c '||chr(39)||'print home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||chr(39);
webutil_host.blocking(cmd_string);
Edited by: mhpinger on Jan 31, 2012 1:32 AM
Edited by: mhpinger on Jan 31, 2012 2:59 AM -
Try to call wfs.exe (MS fax and scan) with webutil_host !!
hi,
I would call from Forms the MS scan and fax application “wfs.exe”.
This is found under windows\system32.
call:
WEBUTIL_HOST.NONBLOCKING ('cmd /c C:\windows\system32\wfs.exe');
Unfortunately, nothing happens. No error message and no cmd-process remains open in the taskmanager.
with other applications it works. For example:
WEBUTIL_HOST.BLOCKING('cmd /c C:\Windows\System32\notepad.exe');
WEBUTIL_HOST.BLOCKING('cmd /c C:\Windows\System32\calc.exe');
I use Forms 10.1.2.3 on Windows 7.
Does anyone have any idea or can test that if it works?
thx Alfredyou can use
WEBUTIL.client_HOST ('cmd /c C:\windows\system32\wfs.exe',hide_screen);
instead of
WEBUTIL_HOST.NONBLOCKING ('cmd /c C:\windows\system32\wfs.exe');
which will run the wfs.exe file located in the windows\system32 directory. if client machine is on the windows O/S
you can view the process list by tasklist command on the command prompt.
you can use cmd /k option for remaining in that session for the errorlevel checking.
Maybe you are looking for
-
Stateless Session Bean lookup truble on standalone OC4J (9.0.3)
Hi all, I've folowing truble: I deploy my app, start browser and get an Excwption javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance found for the ejb-ref 'ejb/ActivationSessionHome'
-
Ichat video not working- giving error
I have successfully used ichat video when I hook my mac directly to my cable modem. But it errors out when I have my typical cabling in place. Comcast cable modem, Vonage box, netgear router, then imac computer. In that sinario, my video ichat doesn'
-
Hello, I am using the follwoing code to import a journal to GL: INSERT INTO GL_INTERFACE (STATUS, SET_OF_BOOKS_ID, USER_JE_SOURCE_NAME, USER_JE_CATEGORY_NAME, ACCOUNTING_DATE, CURRENCY_CODE, DATE_CREATED, CREATED_BY, ACTUAL_FLAG, CURRE
-
Right now, my podcasts get syndicated and show up in iTunes- I had set them up to be downloaded for FREE... However, now with the popularity of my show growing, I would like to charge for downloads. Can someone please tell me how to do this? I'm not
-
Opening stored web sites rote me to default search
Hello , when I want to look offline at a stored website ,I allwaysw end up at the 'default search ' in the adress line. How can I open my storted sites correctly? Thanks