Add the following to the bottom of your stored procedure script:
exec sp_procxmode stored_procedure_name, anymode
go
This will allow it to be executed in chained mode. Note that some stored
procedures cannot be executed in chained mode e.g. one's that create temp
tables.
Peter
-----Original Message-----
From: Ritesh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 10:51 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Cursors from EJB
Hi
I have written a stored Procedure in sybase( on linux).
in which i have a cursor which fetches the data for me
and as per my requirement .
It gives me more than one rows .
If i run from commnad line it givens me perfect results.
When i tried to run the procedure from session bean
i got exception that this procedure can be run in chained mode only
then i changed its transaction mode to chanined from unchained.
After that it fetches data for me but
I am getting only first record , not all
i am calling procedure from session as follows
CallableStatement cS = connection.prepareCall("{call pro_PROSPECTINFO
?}")
cS.setDouble(1,1.0)
Resultset rS = cS.executeQuery();
while (rS.next())
{
.......
}
Can any body help me . ITS URGENT ,
Thanks in adavance
Ritesh
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".