Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Toplink

Toplink

From: LeRoy Kemnitz <lkemnitz_at_uwsa.edu>
Date: Thu, 15 Jun 2006 11:31:37 -0500
Message-ID: <44918B69.9050208@uwsa.edu>


I am trying to use Oracle Toplink in my java app to pass objects to oracle. I am using version 10.1.3 of Toplink and 10.2.0.1 oracle DB. I am developing in RAD 6.0. Or if someone knows how to do it in JDeveloper then I get figure it out too.

I am using the following code and getting an error - 'Internal Exception: java.sql.SQLException: Invalid column typeError Code: 17004'.

I am not a Java developer, just a DBA. Any help would be great.



NameTest nt = new NameTest();

    nt.setFirstName("Tom");
    nt.setLastName("Thumb");  

    StoredProcedureCall call = new StoredProcedureCall();     call.addNamedInOutputArgument("test_black_box",

"test_Object",
"test_Object",

            Object.class);
    ValueReadQuery query = new ValueReadQuery();     query.setCall(call);
    query.addArgument("test_Object");
    Vector args = new Vector();
    args.addElement(nt);
    STRUCT result =
(STRUCT)((Server)getSession()).acquireClientSession().executeQuery(query, args);



Create or Replace TYPE UWSTIS.TEST_OBJECT AS OBJECT (    
    fName            varchar2(30),
    lName            varchar2(30),

    CONSTRUCTOR FUNCTION TEST_OBJECT
    RETURN SELF AS RESULT,         MEMBER PROCEDURE toString
    );


CREATE OR REPLACE function test_black_box

    (test_object IN uwstis.TEST_OBJECT) RETURN uwsths.error_list_t IS
BEGIN     /* Test input sr_array */
    DELETE from uwsths.black_box_test_input;

        INSERT INTO uwsths.black_box_test_input
            VALUES ( test_object.fName,
                        test_object.lName,
                        null,
                        null,
                        null,
                        null);

    COMMIT;
RETURN error_array;
END test_black_box;
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 15 2006 - 11:31:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US