Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

conversion between PL/SQL boolean and Java boolean types

 
Sharath kvs
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am having the code in an SQLJ program as follows. Here NVC is an Oracle stored function
with parameters as NVC(IN NUMBER,OUT VARCHAR2,OUT VARCHAR2,OUT VARCHAR2,OUT VARCHAR2,OUT DATE).The result is of type boolean.I would be grateful is somebody sent me an example to do the following:
1) if b=true i,e within the PL/SQL block then display the data present in the OUT variables otherwise display some other message preferably
within the SQLJ program.
The code is as follows:
int aid = Integer.parseInt(args[0]);
String aclli=null;
String atype=null;
String aaddr=null;
String amanaged=null;
java.sql.Date alast_comm=null;
try {
#sql {
DECLARE
b boolean;
BEGIN
b:=NVC(:aid,:aclli,:atype,:aaddr,:amanaged,:alast_comm); END;
};
}
catch(SQLException e)
{.....}
Thank You
Sharath
[ April 04, 2003: Message edited by: Sharath kvs ]
[ April 04, 2003: Message edited by: Sharath kvs ]
[ April 04, 2003: Message edited by: Sharath kvs ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic