Problem with Stored Procedure and inout parameter
Hi.
This is the code of my stored procedure:
procedure sample_inout(i1 in varchar2, io1 in out varchar2, ritorno out varchar2) as
begin
io1 := i1 || io1;
ritorno := 'PEPPINIELLO VOGATORE';
end;
and this is the code of my program:
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection Cn=DriverManager.getConnection("jdbc:odbc:europadb",userID,passwd);
CallableStatement cstmt = Cn.prepareCall (sql);
cstmt.setString (1,"paipo"); //parameter 1
cstmt.setString (2,"plauto"); //parameter 2
cstmt.registerOutParameter(2 , Types.VARCHAR);
cstmt.registerOutParameter (3 , Types.VARCHAR);
cstmt.execute();
System.out.println (cstmt.getString (2));
System.out.println (cstmt.getString (3));
i should receive:
paipoplauto and PEPPINIELLO VOGATORE
but i receive only paipopl and PEPPINIELLO VOGATORE
anyone can tell why?
thanks
Daniele.

