On Wed, 2003-06-11 at 18:06, Danny Tramnitzke wrote:
> Great, the Replace Function is just, what I need. :-)
> 
> So, now I have such a dbproc :
> 
> create dbproc prog_one (IN input char(50), OUT outstr char(50)) AS
>    SET outstr = REPLACE (input, '�', 'Ae') outstr ;
> 
> But now, my question is, how could I get the outstr ?
> I tried it with java command :
> 
> ...<shorted>...
> String input = "�chtz";
> String output = "";
> Statement stmt = connection.createStatement();
> ResultSet rs = stmt.executeQuery("Call prog_one(" + input + "," + output + 
> ")");
> while (rs.next())
> {
>       System.out.println("output : " + output);
> }
> 
> But there comes the Message : Missing value specification
> 
> So, but I guess, I'm right to use an IN and OUT paramter.. ?

This should give you a hint :

[...]
CallableStatement cs = connection.prepareCall("call prog_one(?,?)");
cs.registerOutParameter(2, Types.VARCHAR);
cs.setString(1, "Hello world");
cs.execute();
String ret = cs.getString(1);
[...]

Thomas.


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to