|
Re: How to maps a PL/SQL %ROWTYPE variable with JAVA? [message #91433 is a reply to message #91272] |
Mon, 02 September 2002 02:21 |
kiran
Messages: 503 Registered: July 2000
|
Senior Member |
|
|
I have a alternate soln.
use the REF CURSOR as IN type in stored procedure and fetch REF CURSOR contents in to %ROWTYPE inside the stored procedure. In java we have "OracleTypes.CURSOR" for mapping with REF CURSOR.
I think it should serve your purpose.
Sample Code
CREATE OR REPLACE PACKAGE testPackage AS
-- Declare the REF CURSOR type
TYPE t_ReferenceCursorType IS REF CURSOR RETURN del%ROWTYPE;
PROCEDURE fun1( p_var1 IN OUT t_ReferenceCursorType);
PROCEDURE test;
END testPackage;
CREATE OR REPLACE PACKAGE BODY testPackage AS
PROCEDURE fun1( p_var1 IN OUT t_ReferenceCursorType)
AS
p_var2 del%ROWTYPE;
BEGIN
FETCH p_var1 INTO p_var2;
p_var2.a := 50;
p_var2.b := '50';
INSERT INTO del values p_var2;
commit;
END fun1;
END testPackage;
|
|
|