Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor location to use 4

Status
Not open for further replies.

developer155

Programmer
Jan 21, 2004
512
US
What is the difference between adUseServer and adUseClient cursor locations and which one is better in the following:
I am using the cursor to run a very large stored procedure and get back the results of the call (to go through the results in my vb app).
I noticed that when I use adUseClient sometimes the sp does not get executed completely, which does nto happen when I use adUseServer.
Is there anything in adUseClient that would cause a big sp not execute completely?

thanks
 
1. adUseServer - (Server Side Cursor) means that ur cursor or recordset will be using the server's resources.

2. adUseClient - (Client Side Cursor) use this if you'll gonna be doing further processing with the data returned by ur SP.. client side cursor (usually static) can be bind to controls such as the data grid, combo box, etc. making it ideal for browsing data..

 
Any reason why client-side would cause issues with executing stored procedure?

thanks
 
When you use a client side cursor with a query that returns MANY records, you have to pull all the data over the network before you can begin using it. And, of course, there are various places where you can set timeouts.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
You may find this useful: faq222-3670

<client side cursor (usually static)
Client side cursor is always static.

Most of the time, the cursors that are used are either static and client side or firehose (forward only) and server side.
 
tell me how were u able to figure out that the data being returned to u by the SP using clientside is incomplete while the serverside is complete?... and how many records do u expect to be returned by the SP? 100K+, 1 M+?... if u could provide some of these information we might be able to figure out ur problem more easily... :)
 
Thanks everyone for responces.
Yes, server side cursor sometimes does not do a good job. I am executinga large stored proc from vb app. This sp returns various data, like the records it created, etc. This sp takes about 10 sec to execute or sometimes more.
What I noticed is with client side cursor, the sp does nto execute completely sometimes. This does nto happen with server side.
The sp returns few recordsets, 10-15 records each

thanks
 
developer,

try to change ur connection's command time out property maybe a little higher or 0

Added information you may consider:
Server Side cursor are faster on execution
Client Side takes longer and sometimes causes timeout

Hope this helps!

[*STAR ME PLEASE]
 
Just as gmmastros already suggested

>>And, of course, there are various places where you can set timeouts.
 
<aside to rmnastor> Under the 'Personal Profile' link at the top of the page there are some guidelines on signatures for your posts. Have a look at it, as there is a specific comment about star requests (marked up in red), and it would be a pity if you were adversely affected by that rule.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top