Re: Get cursor in procedure error.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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]

.



Relevant Pages

  • Re: .Net Scalability problem
    ... LoadRunner will peak out a server with a few virtual users. ... To get an idea of load, ... Fire off the test client and watch the number of ... > So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
    (microsoft.public.windows.server.sbs)
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
    (microsoft.public.windows.server.sbs)
  • Re: Regular disconnections from remote web workplace
    ... I can connect to office server and all office clients from home at all times ... be physically working right up until the connection is lost. ... If I enter http://companyip from a client I receive the login screen for the ... Click Services tab and select Hide All Microsoft Services and Disable ...
    (microsoft.public.windows.server.sbs)