Re: Get cursor in procedure error.
- From: "Jet Mah" <jetmah@xxxxxxxxx>
- Date: 20 Jun 2006 19:08:01 -0700
Thanks a lot, Jaaved.
Jaaved Mohammed wrote:
Hi Jet Mah,
Did you get your problem resolved? I gave this issue some additional though
and I think it would be more efficient to use the JDBC API provided cursor
functionality than to use T-SQL to get one. That is, have the stored
procedure return you a result set by not specifying any output parameters
in the stored procedure. Then call the procedure like
CallableStatement cstmt = conn.prepareCall("{call _fetchdatatest}",
SQLServerResultSet.TYPE_SS_SERVER_CURSOR_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY)
rather than using the selectMethod=cursor property in the connection
string. By setting the cursor type and concurrency at the statement call
you minimize the use of server side cursors for every resultset opened on
the connection. Additionally, there is always the option to do the bulk of
your processing on the server and bringing back small amount of vital
information to the client rather than stream millions of rows to the client
for processing. I hope these suggestions resolve you problem.
Kind Regards,
Jaaved Mohammed [MSFT]
.
- References:
- Get cursor in procedure error.
- From: Jet Mah
- RE: Get cursor in procedure error.
- From: Jaaved Mohammed
- Get cursor in procedure error.
- Prev by Date: RE: collation SQL_EBCDIC037_CP1_CS_AS
- Next by Date: Deadlock occurs on my application frequently
- Previous by thread: RE: Get cursor in procedure error.
- Next by thread: Re: Callablestatement.execute() and clearParameter() causing excep
- Index(es):
Relevant Pages
|