Methods of OLE-objects with IN OUT parameter

How can I invoke a method of an OLE-object with IN OUT parameter?
Trying
obj := CREATE_OLEOBJ(localobject VARCHAR2, TRUE);
INIT_OLEARGS (n+1);
ADD_OLEARG (newvar_1 NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
ADD_OLEARG (newvar_n NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
CALL_OLE(obj OLEOBJ, memberid PLS_INTEGER);
newvar_x := GET_OLEARG_<type>(x);
I get the old value of newvar_x, but it must be changed
Methods with only IN parameter work fine.
I've tried this with OLE2-package, but it hasn't worked too
Can somebody help
Thanks

Hi Gurus
I know this is very old post.
but dose anybody know the answer.
thanks

Similar Messages

  • How to handle the procedure that reutrn object types as out parameter

    I have a procedure where it returns object(CREATE OR REPLACE TYPE xyz AS OBJECT) as a OUT parameter.
    Now i have to pull the data from this type and need to send the data in excel.
    Procedure will fetch data and assign it to object with lot of validations and local parameters variables..
    How can i push the data from the out parameter and need to send that in excel..Its an oracle database 10g..

    here's a basic example...
    SQL> set serveroutput on;
    SQL> create or replace type t_obj as object (x number, y number);
      2  /
    Type created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package mypkg as
      2    procedure testit(p_obj out t_obj);
      3    procedure callme;
      4* end;
      5  /
    Package created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package body mypkg as
      2    procedure testit(p_obj out t_obj) is
      3    begin
      4      p_obj := t_obj(1,2);
      5    end;
      6    procedure callme is
      7      v_obj t_obj;
      8    begin
      9      testit(v_obj);
    10      dbms_output.put_line('X='||v_obj.x||' Y='||v_obj.y);
    11    end;
    12* end;
    SQL> /
    Package body created.
    SQL> exec mypkg.callme;
    X=1 Y=2
    PL/SQL procedure successfully completed.
    SQL>

  • How can I Create function with an  out Parameter

    how all
    how can I Create function with an out Parameter
    I try to create it it sucess but how can I CALL it , it give me error
    please I want A simple example
    thanks

    3rd post on same question by same user :
    Re: how can I Create function with an  out Parameter
    how can I Create function with an  out Parameter

  • Errer when, Call from java to pl sql procedure with table out parameter

    Hi ,
    Please help me ? It's urgent for me .....
    My Oracle Code is like this ,
    CREATE TABLE TEST_TABLE ( DATE1 DATE, VALUE_EXAMPLE VARCHAR2(20 BYTE), VALUE2_EXAMPLE VARCHAR2(20 BYTE), VALUE3_EXAMPLE NUMBER ); CREATE OR REPLACE TYPE TONERECORDTEST AS OBJECT ( DATE1 DATE, VALUE_EXAMPLE VARCHAR2(20), VALUE2_EXAMPLE VARCHAR2(20), VALUE3_EXAMPLE NUMBER ); CREATE OR REPLACE TYPE TTESTTABLE IS TABLE OF TONERECORDTEST; CREATE OR REPLACE PACKAGE test_collection_procedures AS PROCEDURE testCallProcedureFromJava(start_time IN DATE, end_time IN DATE, table_data OUT TTesttable); END test_collection_procedures; / CREATE OR REPLACE PACKAGE BODY test_collection_procedures AS PROCEDURE testCallProcedureFromJava(start_time IN DATE, end_time IN DATE, table_data OUT TTesttable) IS BEGIN SELECT TONERECORDTEST(date1, value_example, value2_example, value3_example) BULK COLLECT INTO table_data FROM TEST_TABLE WHERE DATE1>=start_time AND DATE1<=end_time; END testCallProcedureFromJava; END test_collection_procedures;
    And my Java Code is like
    import java.sql.Connection; import java.sql.DriverManager; import oracle.jdbc.OracleCallableStatement; import oracle.jdbc.OracleTypes; import oracle.sql.ARRAY; import oracle.sql.ArrayDescriptor; import oracle.sql.STRUCT; import oracle.sql.StructDescriptor; public class testPLCollectionType { public static void main(java.lang.String[] args) { try{ //Load the driver Class.forName ("oracle.jdbc.driver.OracleDriver"); // Connect to the database Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@serverbd:1521:squema1","user", "password"); // First, declare the Object arrays that will store the data (for TONERECORDTEST OBJECT TYPE) Object [] p2recobj; Object [] p3recobj; Object [] p4recobj; // Declare the Object Arrays to hold the STRUCTS (for TTESTTABLE TYPE) Object [] p2arrobj; // Declare two descriptors, one for the ARRAY TYPE // and one for the OBJECT TYPE. StructDescriptor desc1=StructDescriptor.createDescriptor("TONERECORDTEST",conn); ArrayDescriptor desc2=ArrayDescriptor.createDescriptor("TTESTTABLE",conn); // Set up the ARRAY object. ARRAY p2arr; // Declare the callable statement. // This must be of type OracleCallableStatement. OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall("{call test_collection_procedures.testCallProcedureFromJa va(?,?,?)}"); // Declare IN parameters. Realize that are 2 DATE TYPE!!! Maybe your could change with setDATE ocs.setString(1,"01-JAN-04"); ocs.setString(2,"10-JAN-05"); // Register OUT parameter ocs.registerOutParameter(3,OracleTypes.ARRAY,"TTESTTABLE"); // Execute the procedure ocs.execute(); // Associate the returned arrays with the ARRAY objects. p2arr = ocs.getARRAY(3); // Get the data back into the data arrays. //p1arrobj = (Object [])p1arr.getArray(); p2arrobj = (Object [])p2arr.getArray(); System.out.println("Number of rows="+p2arrobj.length); System.out.println("Printing results..."); for (int i=0; i<p2arrobj.length; i++){ Object [] piarrobj = ((STRUCT)p2arrobj).getAttributes();
    System.out.println();
    System.out.print("Row "+i);
    for (int j=0; j<4; j++){
    System.out.print("|"+piarrobj[j]);
    }catch (Exception ex){
    System.out.println("Exception-->"+ex.getMessage());
    Actually when i running the java program it is showing error
    Exception-->ORA-06550: line 1, column 58:
    PLS-00103: Encountered the symbol "VA" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VA" to continue.
      I am not getting the error .Please help me out Dhabas Edited by: Dhabas on Jan 12, 2009 3:49 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    // Declare the callable statement.
    // This must be of type OracleCallableStatement.
    ..."{call test_collection_procedures.testCallProcedureFromJa va(?,?,?)}");Looks like Ja divorced va.

  • Performance issue with using out parameter sys_refcursor

    Hello,
    I'm using Oracle 10g, with ODP.Net in a C# application.
    I'm using about 10 stored procedures, each having one out parameter of sys_refcursor type. when I use one function in C# and call these 10 sp's, it takes about 78ms to excute the function.
    Now to improve the performance, I created one SP with 10 output parameters of sys_refcursor type. and i just call this one sp. the time taken has increased , not it takes abt 95ms.
    is this the right approach or how can we improve the performance by using sys_refcursor.
    please suggest, it is urgent, i'm stuck up with this issue.
    thanks
    shruti

    With 78ms and 95ms are you talking about milliseconds or minutes? If it's milliseconds then what's the problem and does it really matter if there is a difference of 17 milliseconds as that could just be caused by network traffic or something. If you're talking minutes, then we would need more information about what you are attempting to do, what tables and processing is going on, what indexes you have etc.
    Query optimisation tips can be found on this thread.. When your query takes too long ....
    Without more information we can't really tell what's happening.

  • How can I use methods of an object with private instantiation in my ABAP?

    Hello all,
    What is the work-around on using methods of an object marked as private instantiation? I tried to use concepts of <b>INHERITANCE</b> or <b>FRIENDS</b> of an object (<u>BCONTACT </u> in my case - a SAP standard object) but it did not work, or at least, I do not know how to properly code the statements in my ABAP program.
    Any code samples, other ideas?
    Your help is greatly appreciated.

    I am closing this question as there has been no answer.
    Message was edited by:
            Goharjou ardavan

  • Syntax for APEX_PLSQL_JOB.SUBMIT_PROCESS with an OUT parameter

    Hi All,
    I am using APEX_PLSQL_JOB.SUBMIT_PROCESS and calling a procedure that has both an IN and an OUT parameter.
    The IN parameter works fine; I am able to call my procedure from APEX and pass it the :APP_JOB item as the IN parameter. The OUT parameter I can't get working. I can call my procedure from a different block in SqlDeveloper and everything works, so I'm confident that my procedure code is correct. I just can't get the OUT parameter returned via APEX.
    This is the plsql code that I'm calling from an APEX dynamic action:
    DECLARE
      l_sql      VARCHAR2(4000);
      l_instance VARCHAR2(30);
       l_job number;
      l_rows_processed number;
    BEGIN
    l_instance := :P9_INSTANCE;
      l_sql      := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); END;';
      l_job      := APEX_PLSQL_JOB.SUBMIT_PROCESS( p_sql => l_sql, p_status => 'Background process submitted');
    l_rows_processed := :F103_ROWS_PROCESSED;
    insert into gse_lng_jobs (instance, job_id, rows_processed) values (l_instance, l_job, l_rows_processed);
    COMMIT;
    END; My procedure is created as:
    create or replace
    procedure UPDATE_TL_TABLES_1 (l_app_job IN number, l_rows_processed OUT number)
    IS......Again, this works fine from SqlDeveloper. Can anyone suggest the proper plsql code? I've tried this using a page item, a system item etc. and no luck. I first tried just passing my procedure a local variable like l_rows_processed, but the procedure wouldn't even run, so I'm assuming the API needs an actual APEX item but I'm out of ideas here.
    thanks in advance,
    john

    That's not going to work because the job hasn't run yet when you perform the insert. So :F103_ROWS_PROCESSED wont contain anything useful.
    Why don't you try performing the insert as part of the job, e.g.
    l_sql := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); insert into gse_lng_jobs (instance, job_id, rows_processed) values ('''||l_instance||''', '||l_job||', :F103_ROWS_PROCESSED); END;';
    ...something like that.

  • How to call a procedure with SYS_REFCURSOR OUT parameter

    Hi,
    Using Oracle 11g R2.
    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    create or replace procedure testprocedure (result OUT sys_refcursor)
    as
    begin
       open result for
          select 1 from dual
          union all
          select 2 from dual;
    end;
    I'd like to call this procedure similar to the way a query is called and executed. Like this
    select * from testprocedure
    I've seen plenty of examples on the web which show how it is possible to loop through results of a sys_refcursor inside of an anonymous block and display the results using dbms_output.putline, but this isn't the method I am looking for.

    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    No - you can only use schema object types (SQL) in SQL queries and only then if you call a function.
    The function can return a SQL collection type or it can be a PIPELINED function whose return value is a SQL collection type. Either way your query will use the TABLE function and be of the form:
    select * from TABLE(testfunction);
    This is sample code for a PIPELINED function based on the SCOTT.EMP table. The function takes a department number parameter and returns the EMP rows for that department:
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    -- pipelined function
    create or replace function get_emp( p_deptno in number )
      return emp_table_type
      PIPELINED
      as
       TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
        emp_cv EmpCurTyp;
        l_rec  emp%rowtype;
      begin
        open emp_cv for select * from emp where deptno = p_deptno;
        loop
          fetch emp_cv into l_rec;
          exit when (emp_cv%notfound);
          pipe row( emp_scalar_type( l_rec.empno, LOWER(l_rec.ename),
              l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno ) );
        end loop;
        return;
      end;
    select * from table(get_emp(20))

  • How do i Call an a method on and object that is a parameter

    I have thee code as below.
    I want to call the method setValue and set the value and pass it a String. i want it called on the jobject param1.
    What do i need to call todo that given the below code.
    JNIEXPORT jobject JNICALL
    Java_PassObjectAndDoSomething_nativeMethod(JNIEnv *env, jobject obj, jobject param1) {
        jstring jstr;
        jclass cls2 = (*env)->GetObjectClass(env, param1);
        jmethodID mid3 = (*env)->GetMethodID(env, cls2, "setValue", "(Ljava/lang/String;)V");
        if (mid3 == NULL) {
            return NULL;
        jstr = (*env)->NewStringUTF(env, "My brand new JString");
        if (jstr == NULL) {
             return NULL;
        /*This causes errors when called*/
        (*env)->CallObjectMethod(*env, param1, mid3, jstr);
        return param1;
    }

    daniel_p wrote:
    /*This causes errors when called*/Presumably you mean a system exception and not java exception of some sort.
    (*env)->CallObjectMethod(*env, param1, mid3, jstr);Why is the asterisk in front of the env parameter in CallObjectMethod()?
    return param1;Since you passed that in it is obviously pointless to return it. But that has nothing to do with your problem.

  • Use of OLE Objects with the Publisher tool

    Our company is trying to put user guides, screen shots, report examples, etc. on the BPMN diagrams that we are creating. I am wondering if anyone has figured out a good way to get multi-page documents to show up as icons which can be clicked from the Business Process Publisher web client. The normal OLE's work decently for users with BPA installed, but they are not hyperlinked in the Web Client. One option I tried was simply displaying the OLE not as an icon, but simply as it's own diagram in BPA, so it would be available that way, but the problem there is it only shows the first page, and it doesn't allow it to be linked to from an icon, it only uses the assignment icon. Any ideas? Best practices?
    -Chris

    HI Chris
    there are link attributes which let you browse and choose a file as link.
    when you create a web export, the files choosen as links for attributes are also exported on Business publisher.
    One of the three profiles you choose when doing a web export support files being copied on BP server
    Cheers

  • How to call a oracle procedure with in/out parameter frm unix shell script?

    Hi,
    I need to call an oracle stored procedure from unix script. The procedure has 1 input parameter and 2 output parameter. Please send me the syntax for the same. Based on the output values of procedure, I have to execute some more commands in unix script.
    Thanks and regards
    A

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • How to execute a stored procedure with an out parameter ?

    Guys I am struggling with executing a stored procedure from sql plus.I mean my stored procedure has 2 input parameter and 1 out put parameter (status of the execution).
    MY_PROCEDURE(p_name in varchar2,p_age in number,p_status out varchar2)
    end my_procedure;
    When I say
    EXECUTE MY_PROCEDURE('manohar','Shetty');
    i get insufficient parameters errors.
    please help.

    EXECUTE isn't a valid PL/SQL construct. It's a SQL*Plus command. You don't want to put any SQL*Plus commands in a PL/SQL block.
    You can always execute a stored procedure purely through PL/SQL
    begin
      my_stored_procedure( x, y, z );
    end;SQL*Plus happens to give you the execute command so you can avoid the begin and end statements.
    Justin

  • Set methods or typecasting objects with JAXB

    Hi everybody,
    I am working on an example with the JAXB, which in many ways is an extraordinary technology, but I have quite a problem.
    I have compiled my schema with xjc - no problem, but i am missing to setMethods both of which is regarding a List. I've got
    java.util.List getSparepart() and java.util.List getCategory() but am missing the two set methods and I don't understand why.
    I have tried to solve the problem by defining the methods myself, which is allright right until the point where I use the methods.
    Here is a snip of the code:
    spTest.jaxb.CatalogType.VendorType vNowTemp = (spTest.jaxb.CatalogType.VendorType) objFactory.createCatalogTypeVendorType();
    vNowTemp = vNow;
    vNowTemp.setSparePartCategory(categoryResult);
    vNowTemp = vNow;
    result.add(vNowTemp);
    The problem is that there seems to be no difference between vNow or vNowTemp at any point, which there should be.
    I have tried to convert the java.util.List I get when I use getSparePart to a com.sun.xml.bind.util.ListImpl (which is the object type used within the classes JAXB's xjc produced) but this seems to be impossible.
    Could any one help me on this one please
    /Sebastian
    [email protected]

    Hi everybody,
    I am working on an example with the JAXB, which in
    many ways is an extraordinary technology, but I have
    quite a problem.
    I have compiled my schema with xjc - no problem, but i
    am missing to setMethods both of which is regarding a
    List. I've got
    java.util.List getSparepart() and java.util.List
    getCategory() but am missing the two set methods and I
    don't understand why.You don't need the SET methods for that. You can get to the list via the GET methods and then add/remove elements to/from it or empty/clear it. If you want to set an entirely different list, you could always use-
    getSparePart().clear();
    getSparePart().addAll(myNewList);
    Hope this helps.

  • Linked Ole Object with MS Word has bad resloution / invalid fonts

    Post Author: Winfried Boennhoff
    CA Forum: .NET
    Environment: .Net 2003 Viewer with external .rpt created by CR XI
    As result I get a bad resolution of the word document and the original fonts are not supported, I tried all common fonts. The font used by CR seems to be default font with a very bad resolution.
    The same effects not only with MS word, although with an linked PDF or any image. All have a very bad resolution.
    Is this a known Problem? Any Idea?

    Post Author: fwinter
    CA Forum: .NET
    We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

  • Problem with calling out parameter

    create table ee(id number,name varchar2(10))
    insert into ee values(1,'o')
    create table ee1 as select * from ee where 1=0
    CREATE OR REPLACE PROCEDURE p(OUT_count OUT NUMBER)
    AS
    CURSOR cur1 IS
    SELECT id, name from ee1;
    v_count NUMBER := 0;
    BEGIN -- MAIN
    FOR row1 IN cur1
    LOOP
    BEGIN
    INSERT INTO ee
    ( id,name)
    VALUES ( row1.id,row1.name);
    v_count := v_count + 1;
    EXCEPTION
    WHEN OTHERS THEN
    null;
    RAISE;
    END;
    END LOOP;
    OUT_count := v_count;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    null;
         RAISE ;
    END;
    begin
    scott.p;
    end;
    i get error

    Hi,
    Whenever you have an error, post the full eroor message, including the line number.
    Indent your code, to show the scope of BEGIN, IF, LOOP, and other statements.
    When you post code on this site, type these 6 characters
    &#123;code&#125;
    (small letters only, inside curly brackets) before and after the actual code, to preserve spacing.
    If the procedure is defined as having one argument, an OUT argument, then you must call it with one argument, and it must be a variable (not a literal) of the correct type (NUMBER, in this case).
    What is the point of
    EXCEPTION
        WHEN OTHERS THEN
            null;
            RAISE;? Why catch the exceptions at all?
    Edited by: Frank Kulash on Mar 30, 2009 5:14 PM

Maybe you are looking for

  • Using a button to call a method

    I am trying to get the button actionPerformed to call the connect method. But I get this error message on compile: ras@2[nuvu]$ /usr/jdk/jdk1.6.0_04/bin/javac MonitorView2.java MonitorView2.java:77: connectPort(java.lang.String) in MonitorView2 canno

  • Safari causing Mac OS 10.8.3 crashes

    Only happens on some websites.  Here's the error log. Interval Since Last Panic Report:  40077 sec Panics Since Last Report:          2 Anonymous UUID:                    2123BB42-6002-9750-62C2-F3C0C9071A8B Tue Apr 30 16:59:13 2013 panic(cpu 0 calle

  • When i plug my iphone 5 to the computer, it does not play any sound except the music app

    I need help to fix my iphone 5. i recently plug in my iphone 5 into the computer and tried to play music on youtube, or websites it does not play anysounds. but when i tried to play music on the music app it works normal. anyone knows please help me.

  • Lightbox in Interactive PDF.

    I have just recently learned about interactive PDFs and their features. I am working on creating one and have a question. What about lightboxes ? How can I create one in an interactive PDF ? My goal: Create an interactive PDF with images or text as b

  • "Missing" picture files in PE 9.00?

    Within the last two months, when I open PE9 in the organize mode, some of the thumbnails generated during the process indicate "missing" files with a small yellow ? in the upper left corner. This represents about 10% of my 6300 photos.  When I select