This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
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

Copying VARCHAR2 Data type to a Java Host Variable of String type in embedded SQL

sharath kv
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know 2 things:
1) Is it possible to copy varchar2 type to a java host variable of type String in an
Anonymous PL/SQL in SQLJ.
String var1; // Java String variable var1
String a;
String x;

try { // PL/SQL Block begins here
#sql {
b varchar2(2000);
msg varchar2(2000);
ret boolean;

ret:=di.func(:IN var1, UT a,msg);
b := UT a; //Unable to copy from a to b??
ret1:=ni.func2(:IN b, UT x,msg);
-- Unable to use :IN b i,e the output buffer
-- of the above procedure as input to
-- another procedure
catch(SQLException e) { }
2) My Second question is
Looking at the above code how do I pass the OUT buffer returned from one procedure as input to another procedure.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic