WEBUTIL_HOST.Blocking

When I try to call the WEBUTIL_HOST.Blocking function from a Webutil enabled Form, I get this error when I try to compile the trigger:
"expression is of wrong type"
It is as if I cannot call WEBUTIL_HOST.Blocking as function.
Here is the code I am trying to compile:
DECLARE
     type PROCESS_ID is record (handle PLS_INTEGER);
     ret_pid PROCESS_ID;
BEGIN
ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
END;
Anyone else run into this problem???
Thanks.

This works for me:
DECLARE
ret_pid WEBUTIL_HOST.PROCESS_ID;
BEGIN
ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
END;Well, when I say works I mean it compiles. Obviously I don't have a 'c:\bat\runprog.bat' to run.
Cheers, APC

Similar Messages

  • 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,
         John

    Hello,
    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,
    Gary

    Ok, 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.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.blocking procedure blocking the application intermittently

    we are using webutil_host.blocking procedure to open a word document and have the application blocked until word document is closed. It opens the word document fine but blocking the application intermittently. Since it was not blocking intially, I started debugging and tried recompiling the form. It is now blocking the application fine, with no change in the code. It is definitely not the recompilation that made the trick because I compiled the form many times earlier while I was working on other parts of the form. Please share your expertise if anyone had the same issue.

    we are using Forms 10.1.2.0.2 with Webutil 1.0.6

  • WEBUTIL_HOST.blocking is not blocking

    Hello,
    I am having problems using WEBUTIL_HOST.blocking for Microsoft Office 2003 products and Adobe. For example, if I try to open a Word document in blocking mode and Word is already open, the blocking feature fails. I found that this happens also in Excel, Outlook and for pdf files. If the host application is not already open the blocking feature works fine. I have found that for file types using notepad, the blocking feature works all the time.
    Here is our setup:
    Forms Version 10.1.2.0.2
    JInitiator: Version 1.3.1.2
    Forms AS 10.1.2.0.2
    DB10g Enterprise Edition Release 10.1.0.5.0
    Windows XP professional, service pack 2
    Here is the code that runs:
    // v_fullname contains the fully qualifed filename
    v_Cmd := 'cmd /c start "" /WAIT "' || v_fullname || '"' ;
    Ret := WEBUTIL_HOST.blocking( v_Cmd ) ;
    I found a thread on here that solved this problem for Word with the following syntax
    v_Cmd := 'cmd /c start "" /WAIT WINWORD /W "' || v_fullname || '"' ;
    Is there a way to solve this problem with a generic solution? All help is greatly appreciated.
    Thanks Jim

    Hello,
    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 /nonblocking_with_callback problem

    I have a word document stored in the database. I want to open it in Word, edit it, save then store it back in the database.
    I thought that by using webutil_host.blocking, it would wait until I'd saved the document before continuing, but it doesn't.
    I've tried the following code:
    ret_code := WEBUTIL_HOST.Blocking('C:\Program Files\Microsoft Office\Office10\WINWORD.exe '|| doc_name ) ;
    and also:
         cmd := 'cmd /c start "" /WAIT "' || doc_name || '"' ;
         ret_code := WEBUTIL_HOST.Blocking( cmd );
    but neither work - the code following (to save back into the database) executes immediately and doesn't wait until I've quit Word.
    I've also tried using nonblocking_with_callback with a callback trigger, but the trigger is executed immediately while my Word doc is still open!
    Can anyone help?

    Hello,
    Yes, it is a user-defined form-level trigger.
    Francois

  • Webutil_host.nonblocking('/bin/smbclient....') at linux mint client

    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 AM

    server 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 Alfred

    you 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.

  • How to delete file from client machine

    Hi all,
    we are using the DataBase: oracle:10g,
    and forms/reports 10g(developer suite 10g-10.1.2.2).
    can anybody help me how to delete the file from client machine in specified location using webutil or any
    (i tried with webutil_host & client_host but it is working for application server only)
    thank you.

    hi
    check this not tested.
    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    V_FICHERO VARCHAR2(500);
    COMILLA VARCHAR2(4) := '''';
    BOTON NUMBER;
    MODO VARCHAR2(50);
    URL VARCHAR2(500);
    Begin
    V_FICHERO := V_ID_DOC;
    LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
    LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
    --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
    LC$Path := 'C:';
    LC$Fic := LC$Path || LC$Sep || LC$Nom ;
    If Not webutil_file_transfer.DB_To_Client
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    Raise Form_trigger_Failure ;
    End if ;
    LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
    Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
    LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
    If LN$But 0 Then
    Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
    Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
    LN$But := Show_Alert( 'ALER_STOP_1' ) ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
    End if ;
    If Not webutil_file_transfer.Client_To_DB
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    NULL;
    Else
    Commit ;
    End if ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Exception
    When Form_Trigger_Failure Then
    Raise ;
    End ;sarah

  • How can I read a blob created with ole container in forms 6i in forms 10g

    In forms 6i I used ole container to save a document (excel, pdf, word...) into a blob column.
    I want to migrate my application in forms 10g and I read that I have to use webutil_File_transfer.db_to_client and after webutil_host.blocking to see the document.
    In the same blob column I can have multiple type of document. How Can I know wich application to use to open the document ?
    Even if I know the extension of my document I'm enabled to open the file ???

    When you click a C/S OLE object, it is opened with its default application's owner, no ?
    So if the OLE object is opened by Excel, the extension is .xls.
    In any case you have to open the OLE object with its "mother" application if you want to save it as a file, so there is no problem at all to decide with extension to use.
    If you read this article : http://sheikyerbouti.developpez.com/webutil-docs/Webutil_store_edit_docs.htm you can see that the filename is automatically opened with the corresponding application.
    Francois

  • How to use Client_Host without the exe file path

    Hi,
    i'm using oracle forms 10g,
    in my application the users can upload any type of files (doc,xls,pdf,avi ,.. etc) and any user can download and open any of these files.
    i implement this using client_host and including the path of winword.exe or AcroRd32.exe ,...
    in many cases i don't know where these exe files are installed in the client side or whether it is installed or not.
    i tried this command : client_host('calc.exe') it works and show me the calc without including the path of this exe file.
    what i want to do is to just call the target file(doc,pdf,avi,..) in the client_host without having to precede this with the exe and path like the calc.exe example.
    if you go to start->run and write for example c:\ahmed.mpeg , windows automatically call the real player or any other video software installed and open the movie.
    can we implement this in oracle forms? and how?

    Hi, you attach a procedure to download a file in the local runs from Windows and to close it updates in the database and then delete the local directory
    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
         V_FICHERO VARCHAR2(500);
         COMILLA VARCHAR2(4) := '''';
         BOTON     NUMBER;
         MODO     VARCHAR2(50);
         URL     VARCHAR2(500);
    Begin
         V_FICHERO := V_ID_DOC;
              -- Ruta y nombre del fichero temporal --
              LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
              LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
              --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
              LC$Path := 'C:';
              LC$Fic := LC$Path || LC$Sep || LC$Nom ;
              -- Descargamos el fichero --
              If Not webutil_file_transfer.DB_To_Client
              LC$Fic,
              'TABLE_NAME',
              'ITEM_NAME',
              'WHERE'
              ) Then
              Raise Form_trigger_Failure ;
              End if ;
              -- Abrimos el fichero temporal en local --
              LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
              Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
              LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
              If LN$But <> 0 Then
                   Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
         Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
         LN$But := Show_Alert( 'ALER_STOP_1' ) ;
         LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
         Raise Form_Trigger_Failure ;
              End if ;
              -- Actualizamos el fichero en la BBDD --
         If Not webutil_file_transfer.Client_To_DB
              LC$Fic,
              'TABLE_NAME',
              'ITEM_NAME',
              'WHERE'
              ) Then     
              NULL;     
              Else
                   Commit ;
              End if ;     
         -- Eliminamos el fichero temporal local --
              LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Exception
              When Form_Trigger_Failure Then
              Raise ;
    End ;

  • How To Open a PDF File in a Oracle Forms

    hi
    all
    I have a Open a PDF file in a PDF viewer when i Press a Button and Check if File is Exit in given Location then open Or Message .
    How This is Possible.
    Help

    this code runs on the webutil configred machines
    PROCEDURE Open_Doc
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(128) ;
    LC$Nom Varchar2(100) ;
    LC$Fic Varchar2(128);
    LC$Path Varchar2(128);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    Begin
         -- Local temporary file name --
         LC$Sep := WEBUTIL_FILE.Get_File_Separator ; -- 10g
         LC$Nom := Substr( :FILE_NAME, instr( :FILE_NAME, LC$Sep, -1 ) + 1, 100 ) ;
         LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
         LC$Fic := LC$Path || LC$Sep || LC$Nom ;
         -- File extraction --
         If Not Webutil_File_Transfer.DB_To_Client
    LC$Fic,
    'CLM_CASE_ATTACHMENTS', ---------table name
    'DOCUMENT_PIC', ----------field name of the picture(blob)
    'CASE_ATTACHMENT_ID = ' || To_Char( :CASE_ATTACHMENT_ID )-------where claues
    ) Then
    Raise Form_trigger_Failure ;
    End if ;
         -- Open the local temporary file --
         LC$Cmd := 'cmd /c start "" /WAIT "' || LC$Fic || '"' ;
         Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
         LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
         If LN$But <> 0 Then
         LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
         End if ;
    end;

  • Webutil HOST function

    Hi, everyone.
    I am trying to write some client_host commands in Oracle Forms 10g. I finished all I need in my application, but there is one problem. I need raise some notepad files on client file system. But problem is I MUST raise file without raise command prompt window ( unfortunately, it is always raising) and when I closed my notepad file command prompt is moved.
    I try with next webutil stuff:
    - webutil_host.nonblocking('cmd /c notepad') - i preferred this routine, cause I need several command, but everytime cmd raise on the screen
    - client_host('cmd /c notepad',no_screen) - no_screen does not work correctly
    - webutil_host.blocking('cmd /c notepad') - i try this, it is not work, but i rather like to use nonblocking
    I also combine all of this with Terminate_Process(process in PROCESS_ID) and Release_Process(process in out PROCESS_ID) .
    Is anyone have some praxis with that.
    Best regards.

    sorry, 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

  • How to get the File-Type from a BLOB-Column

    Hi all,
    I have the database table with the BLOB-Column. In this column are Word/Pdf/Excel/... files can be stored.
    Now I want to open these Files from Webforms.
    I can download the file from database to the client and then open the file with client_ole2.CREATE_OBJ('Word.Application');
    But I can not be sure that the file is a Word-Document.
    How can I know which application is saved in the BLOB-column?
    Regards

    Hi Francois,
    thank you.
    Unfortunatelly I do not know the interMedia functions. Can you send me an example with interMedia?
    I am working with your solution with WEBUTIL_HOST.blocking.
    But when I do not give the extension for the file, in that the BLOB will be temporary stored, I get to see the Windows "Select Program..." window. When I select Word or anything else then the file will be opened, but the locking does not working.
    Any ideas?
    Regards

Maybe you are looking for

  • Getting email notifications but can't find message in mail. Any ideas?

    I'm receiving mail notifications for incoming emails but when I go to mail, the message isn't there. Any ideas?

  • Upgrade apex 2.2 to apex 3.0.1

    Hello, I want to upgrade my apex 2.2 to apex 3.0.1 and I do : c:\sqlplus system/password@XE as sysdba I obtain this : SQL> (my "apex 3.0.1" is in c:\apex\) so I do : SQL> @/apex/apex SYSAUX SYSAUX TEMP /i/ after this, I obtain this message (in french

  • Obiee11.1.1.5.0(Software Only Install) windows 7  64bit Installation Error

    Hi, I have installed obiee11.1.1.5.0 on windows 7 OS with 64bit,while instalation i got below attached error..after that can't able to see sample dashboard on dahsboard page but all services are up only also i can able to login RPD in online mode,as

  • WSAD/Ant/JUNIT problem

    Hi, I'm want to use ant to run some JUNIT tests and generate reports for the tests. I wrote the following build.xml file: <?xml version="1.0" encoding="UTF-8"?> <project name="junitTest" default="test"> <target name="init"> <property name="outdir" va

  • Why does CC have less file types than CS6?

    I have both DW CS6 and CC installed on my system.  Can anyone tell me why CS6 has more file types available from the "file/new" menu than CC has?  For example, CS6 has 18 "HTML" types, yet CC has only 2.  Also, CS6 has a "get more content" link on th