Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 8th, 2006, 03:57 AM
Authorized User
Join Date: Sep 2006
Location: , , .
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Regarding Cursor

Hi Everybody

  Can any body tell me the differnce beetween Client-Side Cursor and Server-Side Cursor.

Thanking you ,

Reply With Quote
  #2 (permalink)  
Old September 8th, 2006, 10:03 AM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Param!

Few defintions from BOL >>

client cursor :
In a client cursor, a default result set is used to cache the entire result set on the client and all cursor operations are performed against this client cache. None of the server cursor functionality of Microsoft SQL Server 2000 is used. Client cursors support only forward-only and static cursors, not keyset-driven or dynamic cursors.

Server cursor :
A cursor implemented on the server. The cursor itself is built at the server, and only the rows fetched by an application are sent to the client. This cursor would not use the client cache.

Server Cursors vs. Client Cursors

There are several advantages to using server cursors instead of client cursors:

If you are going to access a fraction of the data in the cursor (typical of many browsing applications), using server cursors provides optimal performance because only fetched data is sent over the network. Client cursors cache the entire result set on the client.

Additional cursor types
If the SQL Server ODBC driver used only client cursors, it could support only forward-only and static cursors. By using API server cursors the driver can also support keyset-driven and dynamic cursors. SQL Server also supports the full range of cursor concurrency attributes only through server cursors. Client cursors are limited in the functionality they support.

More accurate positioned updates
Server cursors directly support positioned operations, such as the ODBC SQLSetPos function or UPDATE and DELETE statements with the WHERE CURRENT OF clause. Client cursors, on the other hand, simulate positioned cursor updates by generating a Transact-SQL searched UPDATE statement, which leads to unintended updates if more than one row matches the WHERE clause conditions of the UPDATE statement.

Memory usage
When using server cursors, the client does not need to cache large amounts of data or maintain information about the cursor position because the server does that.

Multiple active statements
When using server cursors, no results are left outstanding on the connection between cursor operations. This allows you to have multiple cursor-based statements active at the same time.

I think this content is enough to understand. For further enquiries mail me at - sqldba4u@yahoo.com

-Som Dutt
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Magnetic Cursor - Target Area Cursor? gcarcass .NET Framework 2.0 1 May 5th, 2008 07:20 AM
cursor parameters??? evaldesc SQL Server 2000 8 July 28th, 2007 02:53 PM
Regarding Cursor param99 SQL Language 0 September 8th, 2006 03:56 AM
concat 2 different cursor sreekesh ADO.NET 0 August 18th, 2006 07:11 AM
cursor trinnie SQL Server 2000 0 August 6th, 2006 09:55 PM

All times are GMT -4. The time now is 07:58 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.