Hi Conor and others...

Thanks for responding Conor!
My "out parameter" is actually the result set (several rows). My stored procedure 
returns several rows, and I want to put this in a java.sql.ResultSet, so its not 
really an out-parameter...
I read that a resultset also should be registered as an out-parameter, but how??

So the problem is actually:
How do I call a stored procedure which returns multiple rows??
How do I retrieve the rows returned from the procedure??


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Conor
D'Arcy
Sent: Wednesday, July 12, 2000 11:11 AM
To: [EMAIL PROTECTED]
Subject: Re: Resultset as outParameter...


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

***********************************
Mette Larsen
Consultant, Scandpower AS
e-mail: [EMAIL PROTECTED]
Phone:  69 21 27 00
Mob:    99 25 98 77
Direct: 69 21 27 24
Fax:    69 18 44 35

Personal Web & E-mail:
http://www.Mette.Larsen.net
[EMAIL PROTECTED]
***********************************

___________________________________________________________________________
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