HI Mette,
what goes in as the second parameter is the return type of the data that
your stored procedure returns.
or example, if you are returning a VARCHAR, your code will read


cstmt.registerOutParameter(1,Types.VARCHAR);
More info can be found at
http://java.sun.com/j2se/1.3/docs/api/java/sql/CallableStatement.html
By clicking on " registerOutParameter " method link you will get more info
on your out parameter
See also http://java.sun.com/j2se/1.3/docs/api/java/sql/Types.html " Types "
where a list of valid types can be found.

-----Original Message-----
From: Mette Larsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 12, 2000 8:53 AM
To: [EMAIL PROTECTED]
Subject: Resultset as outParameter...


Hi All,

I sure hope someone can help me with this problem, Ive been struggling with
it for the past 3 days...
I want to call i stored procedure in Sybase which returns multiple rows, I
use this code:

CallableStatement cstmt=null;
cstmt = conn.prepareCall("{ ? = call p_WEB(?, ?, ?, ?, ?, ?, ?, ?, ?, ? )}")
;

The resultset has to be registered as an out-parameter by using
cstmt.registerOutParameter(1,<what goes here>);

Am I right???

My problem is that I cant figure out what to put as the 2nd parameter to
registerOutParameter.

Is there another way to retrive the resultset (with multiple rows) from my
stored procedure.

Please help me...

Regards,
Mette :-)

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to