Calling a PL/SQL from Forte code

Hi, We are using the Sun UDS 5.1.3
I need to call directly from the code a PL/SQL stored procedure. It is true that this would defeat the Forte layer purpose but I have a very specific case. Is there an easy way to do so?

I don't remember how after all these years, but I remember that I made a native Informix call in a special way. So it seems logical that you should be able to do the same for Oracle...
Scott

Similar Messages

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • Call of BW queries from ABAP code

    Has anybody information about how is it possible to call a BW query from ABAP code with parametrization (specifying characteristics) ? In our development project it's a crucial part, beacuse we have to provide interim function modules to carry out some conversion routine on BW provided data, before we put it on the screen embedded in a Visual composer Iview.

    Have a look at this:
    Calling BW queries programatically (also posted on BW forum)
    Hope it helps.
    Regards

  • Calling a PL/SQL from VB with IN argument of object type

    I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
    Thank you

    You have some flaws in your code.
    First - don't use same identifier for pl sql variables ( including parameters) and column names. In your case oracle will evaluate the where clause as where column_name=column_name which is probably not what you want. The next one - you should ensure that select into yields one row , not more, not less, otherwise you 'll run into exception.
    To actually print the desired values, you have to use dbms_output aware client ( sqlplus is such one) and for sqlplus in particular you have to issue set serveroutput on
    Here is a very basic example how can you get it to work:
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> CREATE OR REPLACE PROCEDURE FIND_EMPLOYEES
      2  (p_first_name IN VARCHAR2)
      3  IS
      4  LAST varchar2(10);
      5  BEGIN
      6          SELECT LAST_NAME INTO LAST FROM EMPLOYEES WHERE FIRST_NAME = p_first_name;
      7          dbms_output.put_line(LAST);
      8  EXCEPTION
      9    WHEN no_data_found THEN
    10    dbms_output.put_line('There is no one employee with such first name!');
    11    WHEN too_many_rows THEN
    12    dbms_output.put_line('There are many employees with such first name, try with another one!');
    13  END FIND_EMPLOYEES;
    14  /
    Procedure created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXEC FIND_EMPLOYEES('Julia')
    There are many employees with such first name, try with another one!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Eugenia')
    There is no one employee with such first name!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Adam')
    Fripp
    PL/SQL procedure successfully completed.Best regards
    Maxim

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • How to Call Total Amount field from t.code - PC00_M40_ANN in driver program

    Hi,
    There is a standard Transaction for Payroll Annual display - PC00_M40_ANN. From this transaction we can see the Pension Amount month wise and in Totals as well as.
    In my report, we want to call Total Amount (from T.Code PC00_M40_ANN).
    For Ref., I have design a Smartform with its driver program. In driver program i required this Value...
    Plz guide..

    Hi,
        Please check the below code ....
        Declare variables , structures .....
      call function 'CU_READ_RGDIR'
        exporting
          persnr          = pernr-pernr  <--- pass the pernr
        importing
          molga           = w_molga
        tables
          in_rgdir        = itrgdir
        exceptions
          no_record_found = 1
          others          = 2.
      if not w_molga is initial.
        call function 'CD_READ_LAST'
          exporting
            begin_date      = pn-begda
            end_date        = pn-endda
          importing
            out_seqnr       = w_seqnr
          tables
            rgdir           = itrgdir
          exceptions
            no_record_found = 1
            others          = 2.
      endif.
      if itrgdir is initial.
        continue.
      else.
        select single relid from t500l into w_relid where molga = w_molga.
        call function 'PYXX_READ_PAYROLL_RESULT'
          exporting
            clusterid                    = w_relid
            employeenumber               = pernr-pernr
            sequencenumber               = w_seqnr
            read_only_international      = 'X'
          changing
            payroll_result               = itresult
          exceptions
            illegal_isocode_or_clusterid = 1
            error_generating_import      = 2
            import_mismatch_error        = 3
            subpool_dir_full             = 4
            no_read_authority            = 5
            no_record_found              = 6
            versions_do_not_match        = 7
            error_reading_archive        = 8
            error_reading_relid          = 9
            others                       = 10.
    get all the earnings and deductions
        loop at itresult-inter-rt into wa_rt.
          case wa_rt-lgart.
            to get the net pay
            when '/560'.
              wa_pernr-npay = wa_rt-betrg.
              v_npay = wa_rt-betrg.
           endcase.
    endloop.

  • Need to call webservice WSDL directly from Java code

    Hi All,
    I hope u all are doing great.
    I am new to web services and i have a requirement where i need to call the webservice directly from the java code, we dont need any middle layer(via proxy n all).
    Can you all please help me on this, we are using Jdeveloper 11g and we do have WSDLs
    we shld be able to use the wsdl in code and pass the request and get the request
    Any help will be appreciated
    Thanks

    @Puthanampatti     
    Thanks, but i already went through this link and seems this link also says we need to access webserivice through stub,dii etc.
    I want straught java code to access webservice without any tier in between
    Thanks

  • Calling existing C++ dll from native code causes an ACCESS_VIOLATION

    Hi everyone,
    I'm having issues creating a Java app to call an existing c++ DLL. I've done extensive searching for a solution and found lots of goodies, but nothing to fix my problem yet.
    I've gone through the JNI tutorial and created my java class, used javah, and created my native code according to the tutorial.
    I'm new to dealing with DLLs so I'm not sure if there are some steps that I'm not taking.
    The issue comes when I run the program. I get an EXCEPTION_ACCESS_VIOLATION.
    the DLL I'm trying to call makes a call to a device on the USB port. I also have the source code and header files for the DLL but thought it would be easier to just have to deal with the already built DLL.
    After putting some print statements in the native function, the violation comes when I try to call the function in the external DLL. The DLL itself loads correctly (as far as I know).
    Here my native method that will load the external dll. I got the code to call the DLL method from:
    http://goff.nu/techarticles/development/cpp/calldll.html
    JNIEXPORT void JNICALL
    Java_OCPMControl_OCPMSetPixelCount (JNIEnv *env, jobject obj, jint pixelCount)
    //load the dll
    HINSTANCE ocpmSerialDLL = LoadLibrary("OCPMSerialDLL");
    /* get pointer to the function in the dll*/
    FARPROC myDLLFunction = GetProcAddress(HMODULE(ocpmSerialDLL), "OCPMSetPixelCount");
    /* Define the Function in the DLL for reuse. This is just prototyping
    * the dll's function. A mock of it. Use "stdcall" for maximum compatibility.
    typedef void (__stdcall * FUNC)(enum ePixelNum);
    FUNC MyFunction;
    MyFunction = FUNC(myDLLFunction);
    printf("Calling function\n");
    /* The actual call to the function contained in the dll */
    MyFunction(PIXEL256);
    /* Release the Dll */
    FreeLibrary(ocpmSerialDLL);
    When I run the program, I get the following error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x182
    91E6B
    Function=[Unknown.]
    Library=C:\sun\MyJava\ocpm\src\OCPMSerialDLL.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at OCPMControl.OCPMSetPixelCount(Native Method)
    at OCPMControl.getData(OCPMControl.java:167)
    at OCPMService.main(OCPMService.java:46)
    Dynamic libraries:
    0x00400000 - 0x00406000 c:\sun\j2sdk1.4.2_03\bin\java.exe
    0x77F80000 - 0x77FFD000 C:\WINNT\system32\ntdll.dll
    0x7C2D0000 - 0x7C332000 C:\WINNT\system32\ADVAPI32.dll
    0x7C570000 - 0x7C628000 C:\WINNT\system32\KERNEL32.DLL
    0x77D30000 - 0x77DA1000 C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
    0x08000000 - 0x08138000 c:\sun\j2sdk1.4.2_03\jre\bin\client\jvm.dll
    0x77E10000 - 0x77E75000 C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7E000 C:\WINNT\system32\GDI32.DLL
    0x77570000 - 0x775A0000 C:\WINNT\system32\WINMM.dll
    0x10000000 - 0x10007000 c:\sun\j2sdk1.4.2_03\jre\bin\hpi.dll
    0x007C0000 - 0x007CE000 c:\sun\j2sdk1.4.2_03\jre\bin\verify.dll
    0x007D0000 - 0x007E9000 c:\sun\j2sdk1.4.2_03\jre\bin\java.dll
    0x007F0000 - 0x007FD000 c:\sun\j2sdk1.4.2_03\jre\bin\zip.dll
    0x18270000 - 0x1827E000 C:\sun\MyJava\ocpm\src\OCPMNative.dll
    0x18290000 - 0x182AA000 C:\sun\MyJava\ocpm\src\OCPMSerialDLL.dll
    0x68120000 - 0x681A1000 C:\sun\MyJava\ocpm\src\instrsup.dll
    0x76B30000 - 0x76B6E000 C:\WINNT\system32\comdlg32.dll
    0x70A70000 - 0x70AD5000 C:\WINNT\system32\SHLWAPI.DLL
    0x71710000 - 0x71794000 C:\WINNT\system32\COMCTL32.DLL
    0x782F0000 - 0x78538000 C:\WINNT\system32\SHELL32.DLL
    0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000 C:\WINNT\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 140K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 27% used [0x10010000, 0x10033368, 0x10090000)
    from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
    to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
    tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000)
    the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000)
    compacting perm gen total 4096K, used 1012K [0x14010000, 0x14410000, 0x1801000
    0)
    the space 4096K, 24% used [0x14010000, 0x1410d1f0, 0x1410d200, 0x14410000)
    Local Time = Wed May 12 10:53:56 2004
    Elapsed Time = 10
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
    # An error report file has been saved as hs_err_pid2120.log.
    # Please refer to the file for further information.
    Is there something else I have to do to tell the JVM that the external DLL call isn't an Access Violation?
    Would it be easier to use the source files instead?
    Thanks to anyone who can help me out here!
    Scott Campbell

    Thanks,
    The problem has been solved. I wasn't linking the dll properly to access the external DLL and thus, my native DLL was looking for methods that it didn't know how to find. which was easily solved by adding a few options when creating my native dll.
    Here is the link I found to solve the problem incase anyone else has issues like this. It is regarding implicit v.s. explicit linking to external DLLs in using visual C++.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_link_an_executable_to_a_dll.asp
    Scott.

  • Calling function of JavaScript from  jsp code

    I ve to call one jsp page from other so I need to call another page
    I m trying to do by writing a javascript code for submitting the page

    while redirecting the page when I am using
    request.getParameter of hidden objects in the
    previous page its not giving the correct valuesA redirect is different from a submit, in the sense that it will create a new Request object.
    If you want to pass parameters to the next page, you will have to pass them as part of the url:
    response.sendRedirect("http://myserver/mypage.jsp?param1=value1&param2=value2");And then in mypage.jsp, you can do:
    String value1 = request.getParameter("param1");

  • Call to pl/sql from java event-handler

    How can I call pl/sql procedure or function from java-script event handler
    Thanks,
    Anna

    Anna,
    You cannot call any arbitrary PLSQL code from the forms, only "standard"/custom event handlers can be called through do_event Javascript fuction, syntax :
    do_event(this.form,this.name,1,'ON_CLICK,'');
    where:
    1 - button intstance, if you have more than one instance of the same button on the screen this should be 2,3,4.....
    'ON_CLICK' - is the predefined event type
    '' - the last argument is any user defined string which will passed down to the PLSQL event handler.
    Thanks,
    Dmitry
    null

  • Can i call a Coldfusion page from C# code?.

    I got a .Net application.
    Part of this application is written in coldfusion.
    How can i call coldfusion page from C# application?.
    Please post sample and code.

    To open a web page in the browser in C#:
    System.Diagnostics.Process.Start("YOUR URL HERE");
    To call a webpage without opening the browser take a look at
    the HttpWebRequest class in .NET
    http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.aspx
    Disclaimer: I haven't used the HttpWebRequest class in a
    production project so I'm not sure if it will do what you want.
    You might also consider exposing the CF functionality you
    wish to use as a web service, then invoking the web service in your
    .NET project.
    Please post your solution to forum, I'm interested in hearing
    how you solve your issue.

  • Calling session facade methods from my code

    My application consists of two projects: Interface and Model. Model, of course, is used for access to a database using TopLink with POJOs and session facade bean...Pretty much like thing done int tutorial. While, naturally, Interface project are the web pages etc. Standard web application.
    Now, there is no problem with using data controls from session facade bean (drag and drop to the form for making tables, lists, forms etc.), that works fine.
    What I need is to use methods from my session facade bean in my code. For example, I have made a TopLink query findAllLabels. It is exposed in session facade bean UtilBean so in the bean the code is
    List<Labels> findAllLabels(){
    So In some part of my code (for instance, in some backing bean) I would like to call this query. I have done this:
    UtilBean util=new UtilBean();
    List<Labels> labels=util.findAllLabels();
    And this works fine, for now. But, I'm wondering, is this the correct solution, and is there some more ellegant and correct way to do this? Is it correct to instantiate a session facade bean in this way?

    The more appropriate and correct solution is as follows:
    Drag the toplink named query(without expanding it) from the data control pallete into your h:form.
    You will get an option to create a ADF Command Button or ADF Command Link.
    Select ADF Command Button.
    Double click the generated button.
    It enables you to create a default action listener for the button. Ensure that the Check box labelled
    "Generate ADF Binding Code" is checked.
    Click OK.
    This should create a method in your backing bean
    as
    public String commandButton1_action(....)
    /*Generated Code.
    Insert your code here
    This should solve your problem
    Bye.

  • Need to call a recursive SP from Java code

    I have a table with parent child relationships as:
    CREATE TABLE parent_child
    parentid NUMBER,
    childid NUMBER
    Each child can have more than one parents. Now for a given child i need to find all the parents. My solution is a stored procedure as follows:
    CREATE OR REPLACE PROCEDURE Sp_Getparents(child_id IN NUMBER)
    IS
         CURSOR parents IS
    SELECT parentid FROM PARENT_CHILD WHERE PARENT_CHILD.childid = child_id;
    BEGIN
    FOR parents_cur IN parents LOOP
    DBMS_OUTPUT.PUT_LINE(parents_cur.parentid);
         Sp_Getparents(parents_cur.parentid);
    END LOOP;
    END Sp_Getparents;
    This prints the non-distinct values fo all parents to a value.
    Now my problem starts when i wish to access the result of this SP from my java code.
    For that i have no idea if a DBMS_OUTPUT will give me a resultset or not. If not, then what is the way to do so. I tried creating a REF CURSOR for the same, but was not able to test the result out on sqlplus.
    Can anyone help me on this?
    Thanks in advance
    Pankaj

    You need to return a refcursor like this (9i and up)
    CREATE OR REPLACE
    FUNCTION sp_getparents(child_id IN NUMBER) RETURN SYS_REFCURSOR
    IS
      c SYS_REFCURSOR;
    BEGIN
      OPEN c FOR
        SELECT parentid
        FROM parent_child
        WHERE parent_child.childid = child_id;
      RETURN c;
    END sp_get_parents;
    show errorsif you want to test this in SQL*Plus:
    var c refcursor;
    exec :c := sp_getparents(3);
    print c;hope this helps
    chet

  • Calling procedure PL/SQL from OCCI passing objects

    Hi all!
    I need a sample from a OCCI program that call a stored pl/sql procedure and pass an IN OUT parameter of type object.
    Thanks in advanced!

    I don't remember how after all these years, but I remember that I made a native Informix call in a special way. So it seems logical that you should be able to do the same for Oracle...
    Scott

  • How to call a darwin command from c-code?

    Is there a way to call a Darwin command (in my case unzip )
    from a bundle written in c language?
    Thanks

    "man 3 system"
    system("unzip filename");

Maybe you are looking for

  • How can I set the fax prefix no. on HP officejet pro 8600

    Greeting. I have a HP Officejet Pro 8600, and I want to send FAX thru this. In my office, we need to put '0' to call outside. However, there is no prefix setting menu on this device. I have another model HP 1213mf which has Prefix No. menu on it, but

  • Cannot get 'c' key to work on startup

    Hey. Having trouble with getting the 'c' key to work on startup - computer just starts up as normal instead. Why?? I have an iMac 7,1 with Intel Core2 Duo 2GHz, bought about 2008 and all very standard running Mac OSX 10.5.8. Am intending to upgrade t

  • How to know the path of file.

    i am facing a problem,i have prepared a jar file of an application, which should have a path-file in it & that path-file contains loaction from where applicatioin starts, and creates some file there. but i dont know loaction when i prepared the jar f

  • Yellow ink prints with a greenish hue (sometimes streaky)

    Overall colors appear to be muted - not vibrant or vivid Yellow almost always prints with a greenish hue -s frequently streaky I have run print alignments; the appear to be ok I have  run the clean cartridge test; Somewhat dull looking not brilliant

  • InDesign CS4: No Table of Contents Item in Layout menu.

    There is no Table of Contents menu item in the Layout menu. I have a purchased educational version of InDesign CS4 Anybody know how to fix this?