Home » Developer & Programmer » JDeveloper, Java & XML » How to maps a PL/SQL %ROWTYPE variable with JAVA?
How to maps a PL/SQL %ROWTYPE variable with JAVA? [message #91272] Wed, 26 June 2002 13:20 Go to next message
Devang Pandya
Messages: 9
Registered: June 2002
Junior Member
in my procedure I've
procedure test (ap IN OUT appl_param%rowtype) ;

I want to map this ap record type variable with the incoming argument from JAVA...I dont know is it possible or not?

Plz. help.

Thanx in advance
Devang
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 Go to previous message
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;
Previous Topic: JDBC Oracle 8i
Next Topic: Re: sample test questions for OCP exams IZO-501/502/504/505
Goto Forum:
  


Current Time: Fri Mar 29 02:14:51 CDT 2024