Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Very Very Urgent : Java with Oracle
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C04B3F.BD3F9EE0 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I have a situation like this.
There is a stored procedure which accepts few arguments. based on these =
arguments, a SQL statement is framed on the fly.
When this procedure is called from Java, the statement that is framed on = the fly is executed and has to give resultset to the Java Calling = program.
How would appreciate if someone tells me how to do it?
I tried using Open For and Execute Immediate inside the procedure, but = then the questions arises as to how the resultset is given to the = calling java program because for every fetch the records have to stored = somewhere. One way I could think of is PLSQL Array but parallely a = question arises as to how will a PLSQL array be returned to a Java = program and how will Java understand PLSQL array type.
Any suggestions, please help.
Raj
------=_NextPart_000_000F_01C04B3F.BD3F9EE0 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a situation like =
this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There is a stored procedure which =
accepts few=20
arguments. based on these arguments, a SQL statement is framed on the=20
fly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When this procedure is called from =
Java, the=20
statement that is framed on the fly is executed and has to give =
resultset to the=20
Java Calling program.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>How would appreciate if someone tells =
me how to do=20
it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I tried using <STRONG>Open For</STRONG> =
and=20
<STRONG>Execute Immediate </STRONG>inside the procedure, but then the =
questions=20
arises as to how the resultset is given to the calling java program =
because for=20
every fetch the records have to stored somewhere. One way I could think =
of is=20
PLSQL Array but parallely a question arises as to how will a PLSQL array =
be=20
returned to a Java program and how will Java understand PLSQL =
array=20
type.</FONT></DIV><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any suggestions, please =
help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>