This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Praveena, As far as I know, you cannot read the output from DBMS_OUTPUT in a java program.
Perhaps try creating a PL/SQL function that returns the string you are trying to read. That's something you can obtain from a java program (using the "execute()" method in "java.sql.CallableStatement").
No, I did not suggest using an OUT parameter in an Oracle stored procedure, I suggested using an Oracle stored function. I do believe that the two are different.
Good Luck, Avi.
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
posted
0
Originally posted by Avi Abrami: Srini,
No, I did not suggest using an OUT parameter in an Oracle stored procedure, I suggested using an Oracle stored function. I do believe that the two are different.
Good Luck, Avi.
Oh ! i'm sorry Avi, i mis-understood it .. What about out parameter ? Is it not a good design ? Please throw some light on it. Also Avi, if possible Can you guide me Here. [ January 01, 2005: Message edited by: srini vasan ]
Srini, I believe there are situations where OUT parameters are a "good design" (as you put it). However, based on the information that Praveena has supplied, I think that a (PL/SQL) function is more appropriate.
Good Luck, Avi.
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
posted
0
ok. Where to use a Pl/SQL function & where to use a OutParameter Any Idea on it ? Does it make any differnece on the execution time ?
Srini, I use OUT parameters when I need to return more than one value from a (PL/SQL) routine -- since a function can only return one value.
If I only return one value, then I prefer to use a function.
I don't know if there's a performance difference between using OUT parameters or functions.
Good Luck, Avi.
Srinivasa Raghavan
Ranch Hand
Joined: Sep 28, 2004
Posts: 1228
posted
0
Originally posted by Avi Abrami: Srini, I use OUT parameters when I need to return more than one value from a (PL/SQL) routine -- since a function can only return one value.
If I only return one value, then I prefer to use a function.
I don't know if there's a performance difference between using OUT parameters or functions.