How to call .BAT file in Oracle Forms

Hi All,
I am using Oracle Forms 6i. We have a .Bat script which moves file from our local directory to the server.
I want to invoke this .Bat script to be called when I click on a button in the form.
Appreciate your help here.
Thanks,
Madhu K.

Hi
I use this in oracle forms 6i: first i assign this path to a variable:
DECLARE
v_path   VARCHAR2(1000);
BEGIN
v_path:= 'C:\file_name.bat'  then I use the host command:
HOST( 'cmd /c start' || v_path , no_screen); 
END;Hope this helps...
Regards,
Abdetu...

Similar Messages

  • How to call pdf files from oracle forms

    I have a pdf file in the server , I need to call this and open when a button is pressed in the oracle forms.
    Please let me know how to do this.
    Thanks,
    Previn

    Frank,
    I have oracle applications and I want to open a pdf file located in the server from a button in oracle applications.
    Previn,
    you don't mention the Forms release you are running.
    If you are running Forms on the web, you can use
    web.show_document() to load files from the Web if
    they are accessible via HTTP.
    Frank

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • How to open .cmdrw file from Oracle Forms 10g

    Hi,
    We need to call *.cmdrw* file from Oracle forms 10g. Is there any way to call *.cmdrw* file from Oracle forms 10g?
    Thanks for the help.
    Viishnu Nekkanti

    In case you want to open a .cmdrw with its associated application you can use the following procedure:
    webutil_host.NonBlocking( 'rundll32 url.dll,FileProtocolHandler ' || client_filename );This works for every file where a program has been associated to its file extension. (Adobe Reader for *.pdf, Microsoft Word for *.doc, Microsoft Excel for *.xls and so on)
    Regards
    Markus

  • How to call database procedure in oracle forms

    Hi,
    Can anyone describe me that how I'll call database procedure in oracle forms (6i,10g)?
    Thanks in Advance.
    Baloch

    Hi Francois,
    As I created a procedure in database as below
    create or replace procedure For_table (tbl_of in number,st_pnt in number,en_pnt in number) is
    begin
    for i in st_pnt..en_pnt loop
    dbms_output.put_line(tbl_of||'*'||i||'='||tbl_of*i);
    end loop;
    end For_table;
    The above procedure is working fine when I'm using PL/SQL. I call the above procedure as
    begin
    For_table(3,5,20);
    end;
    but nothing happen
    Thanks in Advance.
    Baloch

  • How to call java function in Oracle forms?

    Hi I am having Oracle 9i with 10g Developer Suite.
    I am new to Oracle forms..
    I had one function in java getDatas()..
    How can I call this function in Oracle Forms..
    Pls help
    Thanks

    Thanks Francois,
    I want to display values from my java code in the Forms..
    For that purpose only i am installing 10g Developer Suite..
    The below is java code..
    public class DBTest {
              public static String callDB(int id,String name){
              String ss="Hai";
              Connection con=null;
              try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("url","id","pwd");
                   Statement st=con.createStatement();
                   System.out.println("Connected...");
              int r=st.executeUpdate("Insert into FORM_TEST VALUES('"+id+"','"+name+"')");
                   if(r==1){
                        ss="Inserted Sucessfully";
                   else{
                        ss="Insertion Failed";
              }catch(final Exception e){
              System.out.println(e);
              return ss;
         public static void main(String[] args) {
              int empid=102;
              String empname="Gilbert";
              String resultStr=callDB(empid,empname);
              System.out.println(resultStr);
    I want to dispaly Inserted or Insertion Failed in Oracle Forms..
    As per Gerd Volberg suggestion, i had placed DBTest.jar in
    E:\DevSuite\forms\java\DBTest.jar
    and in formsweb.cfg the below jar is added..
    archive_jini=frmall_jinit.jar,DBTest.jar
    But in Fomrs Builder-->Program-->Import Java Classes-->Oracle
    org,ice,com and subnodes are available.
    But my jar is not available..
    Is my way is coorect?
    Pls provide soln..
    Thanks

  • How to generate excel file in oracle forms 10g on client machine

    dear Sir,
    I am using just file server(installed 10g dev suite) not a oracle application server,
    I am running my application from another machine ,it running fine i want to generate excel report on client machine
    presently i m using OLE2 for fetching the data in excel , it is working fine but it generates the excel file on file server machine and i want get the output excel on the client machine. aftre OLE2 i m using CLIENT_OLE2 with webutil (instead of OLE2) its get compile successfully but during runtime it give error "oracle.forms.webutil.ole.OleFunctions bean not "found.CLIENT_OLE2.create_obj will not work"
    *so please tell me without oracle application server is this possible or not .*

    your webutil on server side is not configured
    you need to re install the webutil jacob.dll files etc. then it will work fine..
    you can also generate excel file using reports to change the destination format in SPREADSHEET

  • How to Save a File in Oracle Forms 6 ?

    Dear All,
    I am using Oracle Forms 6. I need to save a file in .lst format.
    I am using,
    flnm:=get_file_name('E:\',file_filter=>'Text Files(*.lst|*.lst|');
    I f I use this, It prompts me to save the file. I want to save it automatically without asking me to enter the file name. We can get file name too from the above syntax
    flnm:=get_file_name('E:\','Test',file_filter=>'Text Files(*.lst|*.lst|');
    But i dont want the system to prompt me to save manually. It must be saved in the proper location as mentioned.
    Advance thanks for all.
    Kindly help me to overcome this issue

    Here's an example of a way to write out a file which writes out data from a particular block. The field names are hard coded so need to
    be customized:
    /* write out data as tab delimited file for import into
    excel etc */
    function write_file (myfile in varchar2) return varchar2 IS
      out_file          text_io.file_type;
      item_name varchar2(32);
      errnum number := ERROR_CODE;
      errtxt varchar2(80) := ERROR_TEXT;
      myblock varchar2(32) := 'MY_BLOCK';
      addrno integer := 0;
    BEGIN
      go_block(myblock);
      go_record(1);
      out_file := text_io.fopen(myfile,'w');
    /* output field header for excel or word */
      text_io.putf(out_file,'%s\n', 'notes' || chr(9) || 'subR' || chr(9)||'X' || 'someid' || chr(9)  ||
        'title' ||chr(9)||
            'first_name'||chr(9)||'last_name'||chr(9)||
          'home_address'||chr(9)||'home_city'||chr(9)||'home_state'||chr(9)||'home_zip');
      LOOP
            if (addrno > 0) then
                   text_io.putf(out_file,'\n');
            end if;
            addrno := addrno + 1;
            text_io.putf(out_file,'%s',:MY_BLOCK.some_notes || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.sub_ripple || chr(9));
            text_io.putf(out_file,'%s','X' || :MY_BLOCK.someid || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.title || chr(9) || :MY_BLOCK.first_name
                            || chr(9) || :MY_BLOCK.last_name || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_address || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_city || chr(9) || :MY_BLOCK.home_state ||
               chr(9) || :MY_BLOCK.home_zip);
            IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
             EXIT;
         END IF;
         NEXT_RECORD;
      END LOOP;
    text_io.fclose (out_file);
    return 'Y';
       exception
         when others then
             message ('ERROR write_file '|| myfile || ' ' || :system.cursor_block || ' '
             || :system.cursor_record || ' ' ||:system.cursor_field || ' '
              || errnum || ' ' || errtxt);
             bell;
             synchronize;
             return 'N';
    END;

  • How to call .bat file

    hi ;
    i want to call a batch file in my java programe, i have tried it but i am gettin a error any one can help me ,,
    public class ExecutingBatfile {
         public static void main(String[] args) {
              try
                   Runtime rt= Runtime.getRuntime();
                   Process p=rt.exec("C:/DumpFile/Deliver.bat");
                   int exitValue=p.exitValue();
                   System.out.println( exitValue);
                   //rt.exec("cmd start /c C:/DumpFile/Deliver.bat");
              }catch(Throwable e)
                   e.printStackTrace();
              System.out.println("Finished");
    can u advise me and correct this code , so that i can learn
    thanks and regards
    A.David

    davvidmaria wrote:
    i want to call a batch file in my java programe, i have tried it but i am gettin a error any one can help me ,,What error?
    can u advise me and correct this code , so that i can learnAFAIK
    Process p=rt.exec("cmd /c C:\\DumpFile\\Deliver.bat");Read this article for more details: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Calling a report from oracle form 10g

    how to call a report from oracle form 10g

    Please see the link:
    http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How to call a .rpt file from oracle form 10g

    I need to call a .rpt file from oracle form 10g. please suggest what to do for this

    Hi,
    onlz rdf and rep files are Reports executables. Convert rpt to rep and you are file (Reports has a conversion utility in the bin directory)
    Frank

  • Call an executable file from oracle forms 6i

    Hello ,
    i want to call a local .exe file from oracle forms 6i passing along a couple of parameters in the command line .
    Can anyone help me out here ?
    thanks
    C.
    Edited by: user539712 on Jan 21, 2011 11:55 AM
    Edited by: user539712 on Jan 21, 2011 11:55 AM

    that worked...now i am facing a different issue now which i didnt have without the start command . i am calling iexplorer.exe but i am passing a long a url in the command line . the 2nd parameter in the url is not working so when i do :
    "start c:\progra~1\intern~1\iexplore.exe" http://localhost/hello.jsp&a=ddd&b=333
    the &b=333 is not passed (some issue with the & character i am guessing). Would you know a workaround ?
    thanks

  • URGENT!!! calling crystal reports from oracle forms 10g

    Is it possible to call crystal reports from oracle forms 10g?
    Can someone help to answer how, if there is a solusion, to call crystal reports from oracle forms 10g.
    Please provide codes with details showing step by step.
    Thanks

    hi
    try something like this.
    DECLARE
    charWinHandle VARCHAR2(50);
    numWinHandle NUMBER;
    BEGIN Set_Application_Property(Cursor_Style,'BUSY');
    charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
    numWinHandle := To_Number(charWinHandle);
    :Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowParentHandle
    := numWinHandle;
    :Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowState := 2;
    :Item('CONTROL.CRYSTALREPORT1').OCX.Crystal.Crysta lReport.Connect
    := 'DSN=;UID=' || Get_Application_Property(UserName) ||
    ';pwd=' || Get_Application_Property(password) || ';dsq=;';
    Crystal_CrystalCtrl.ReportFileName( :Item('Control.CrystalReport1').interface,
    'C:\Sample_Rep.Rpt' );
    Set_Window_Property( Forms_Mdi_Window, Window_State,Maximize );
    Set_Window_Property( 'MAIN', Window_State, Maximize );
    :reptitle := 'Report Preview Window';
    numWinHandle := Crystal_CrystalCtrl.PrintReport( :Item('Control.CrystalReport1').interface );
    Set_Application_Property(Cursor_Style,'DEFAULT');
    END;NOTE: Change the report name and path according to your required file name and path in
    the "Crystal_CrystalCtrl.ReportFileName" method call. Also, the connection string shown
    assumes that you will use the current USER and PASSWORD for the Form.
    - To make the above Form generic so that you can run any Crystal report from it, then create
    a parameter for the report name and pass it to the Form using CALL_FORM from any other Form.
    Then just replace the file name with the passed parameter.
    -. Run the Form
    If its correct/helpful please mark it thanks.
    sarah
    Edited by: S@R@h on Nov 27, 2009 6:33 AM

  • Calling Report from Menu (Oracle Forms 11g)

    I'm trying to call a report from a menu item in a menu (that is attached to a form) in Oracle Forms 11g directly and I'm having some difficulty. I know how to call a report from a form and everything works perfectly.
    But since in a menu there is no item called "Report" to attach like there is in Forms, I followed on route which is to attach the "rp2rro" PL/SQL library on the menu file (mmb) and I also even did it on the form itself. Then when you convert a menu using the Forms Migration Assistant, it will comment out statements like "ADD_PARAMETER" and replace with calls to packaged procedures/functions from the package "rp2rro". I set all the parameters
    RP2RRO.SETOTHERS('PARAMFORM=YES');
    RP2RRO.SETDESTYPE('CACHE');
    RP2RRO.SETDESFORMAT('PDF');
    RP2RRO.SETCOMMUNICATIONMODE(SYNCHRONOUS);
    then made the call to the report:
    RP2RRO.RUN_PRODUCT(REPORTS, 'MYREPORT', SYNCHRONOUS, RUNTIME, FILESYSTEM, param_list_id, NULL);
    but all i get is the error "FRM-41219: Cannot find report: invalid ID."
    The Oracle documentation for integration reports in forms is for when you execute the report within a form not a menu item (that is attached to a form). Any clues?
    My environment is:
    Oracle (Database, Fusion Middleware) 11g - Red Hat Enterprise Linux 5
    Web Browser - Internet Explorer 7 on Windows XP Professional
    Thanks,

    Francois Degrelle wrote:
    Hello,
    One option is to use the Web.Show_Document() built-in, with the complete Report Server URL inside. Of course, you can hide some information (connection string for instance) by calling a section of the /reports/conf/cgicmd.dat configuration file.
    FrancoisI tried it using the code below
    DECLARE
    c_relative_path CONSTANT VARCHAR2(50) := '/reports/rwservlet/?server=';
    c_rep_srv_name CONSTANT VARCHAR2(50) := 'rep_wls_reports_calgf3_asinst_1';
    c_rep_name CONSTANT VARCHAR2(30) := 'copy_detail.rdf';
    c_desformat CONSTANT VARCHAR2(10) := 'htmlcss';
    c_destype CONSTANT VARCHAR2(10) := 'cache';
    v_username VARCHAR2(100);
    v_password VARCHAR2(100);
    v_db_instance VARCHAR2(40);
    v_connect_string VARCHAR2(300);
    v_rep_srv_params VARCHAR2(200);
    v_rep_url VARCHAR2(400);
    BEGIN
    v_username := LOWER(get_application_property(username));
    v_password := LOWER(get_application_property(password));
    v_db_instance := LOWER(get_application_property(connect_string));
    v_connect_string := v_username || '/' || v_password || '@' || v_db_instance;
    v_rep_srv_params := '&report=' || c_rep_name ||
    '&desformat=' || c_desformat ||
    '&destype=' || c_destype ||
    '&userid=' || v_connect_string ||
    '&paramform=yes';
    v_rep_url := c_relative_path || c_rep_srv_name || v_rep_srv_params;
    web.show_document(v_rep_url, '_blank');
    END;
    and I get a new tab in the browser opening up (which is good at least) with the Oracle Reports Services page saying:
    Error
    No such Web command ().
    Now I've tried putting a URL of a Oracle's website (http://www.oracle.com) and that works perfectly. Another question is, where would the default directory be if I wanted to say call an HTML file? Would it be in the directory of FORMS_PATH where all my fmb, fmx, rdf, pll, etc...files are stored?
    Thanks,

Maybe you are looking for

  • Mapping Error Message

    I have completed the mapping of an IDOC to File Data Structure. I ran the testing once and it said successful bu no target fields were populated. I then mapped all of the root nodes to a constant to see if it made a difference and I get the following

  • Error in 9i

    Hi! recently upgraded to 9i and migrated our spatial data too, for a week everything seem to be running fine but suddenly start getting this error: ORA-00604: error occurred at recursive SQL level 1 ORA-06521: PL/SQL: Error mapping function ORA-06512

  • SLD connection failing from PORTAL

    Hello All, Our env is EP 6.0 ,ORACLE 9i as DB ,OS as Linux. In portal under WebDynpro, the SLD test connection is failing and due to which none of the JCO connections are working  . The user used for the communication is SLDDSUSER , which has the rol

  • #Unavialable Error in Curency Column

    Hi All, I am using 4.1 BO i am trying to create vertical table. In  revenue column i have different types of currency EUR,CHF.... when i am apllying filter on another dimension object  (Input Control) it showing error #Unavailable in revenue column i

  • Problem in SAP-script alignment

    Hi Experts, Need your help in aligning script. in the script output , one field "BAPIESLL-QUANTITY" in not getting display properly. Problem is if it fetches 6 digit value e.g.100000, it displays proprly aligned but if it fetches 2 digit values its n