Home » Developer & Programmer » JDeveloper, Java & XML » How to call the Oracle Proc from Java
How to call the Oracle Proc from Java [message #127629] Tue, 12 July 2005 10:39
krishmoore
Messages: 5
Registered: May 2005
Junior Member
Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.

Here is my code will look like...


1. CREATE OR REPLACE TYPE emp AS OBJECT
(
Empno NUMBER,
Ename VARCHAR2(50)
);

In step1 I have created object type.

2.CREATE OR REPLACE PACKAGE ref_pkg IS
TYPE tab_emp IS TABLE OF emp;
END ref_pkg;
In step2,I have created a table type which is of type emp;

3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
BEGIN
FOR I IN 1..p_emptab.COUNT
LOOP
/*
Some code written here
*/
END LOOP;
END;

In step3 I have passed tabletype which is of type emp as argument.

Now I need to invoke this procedure from JAVA.
Calling a procedure doesn’t matter.
But how I can map objecttype ? how will java recognize oracle object ?
How can I implement this ?

Any Help/Clues is Appreciated.

Thanks
Krishna
Previous Topic: Importing/Exporting data from relational DB in XML
Next Topic: CheckBox / DataControl
Goto Forum:
  


Current Time: Mon Nov 25 11:32:15 CST 2024