IT Community - Software Programming, Web Development and Technical Support

How to create and use server side cursors in SQL Server?

This is a discussion on How to create and use server side cursors in SQL Server? within the Database Support forums, part of the Web Development category; How to create and use server side cursors in SQL Server?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-30-2007, 01:20 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Question How to create and use server side cursors in SQL Server?

How to create and use server side cursors in SQL Server?
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-30-2007, 01:22 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: How to create and use server side cursors in SQL Server?

a.Declaring a Cursor
This is Syntax of Declaring a Cursor
DECLARE cursor_name [INSENSITIVE] [SCROLL] CURSOR
FOR select_statement
[FOR {READ ONLY | UPDATE [OF column_name [,...n]]}]

or

DECLARE cursor_name CURSOR
[LOCAL | GLOBAL]
[FORWARD_ONLY | SCROLL]
[STATIC | KEYSET | DYNAMIC | FAST_FORWARD]
[READ_ONLY | SCROLL_LOCKS | OPTIMISTIC]
[TYPE_WARNING]
FOR select_statement
[FOR UPDATE [OF column_name [,...n]]]

b.Opening a Cursor
This is Syntax of Opening a Cursor
OPEN { { [GLOBAL] cursor_name } | cursor_variable_name}

c.Fetching a Cursor
This is Syntax of Fetching a Cursor
FETCH
[ [ NEXT | PRIOR | FIRST | LAST
| ABSOLUTE {n | @nvar}
| RELATIVE {n | @nvar}
]
FROM
]
{ { [GLOBAL] cursor_name } | @cursor_variable_name}
[INTO @variable_name[,...n] ]

d.Closing a Cursor
This is Syntax of Closing a Cursor
CLOSE { { [GLOBAL] cursor_name } | cursor_variable_name }

e.Deallocating a Cursor
This is Syntax of Deallocating a Cursor
DEALLOCATE { { [GLOBAL] cursor_name } | @cursor_variable_name}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-01-2007, 08:54 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: How to create and use server side cursors in SQL Server?

Did u mean creating cursors on the Database server and will work on the events based on the database / server updations?
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client side JavaScript and and Server side Java Script sathian HTML, CSS and Javascript Coding Techniques 2 11-09-2007 10:30 PM
difference between Client side JavaScript and and Server side Java Script? Sundaram HTML, CSS and Javascript Coding Techniques 1 09-05-2007 11:46 AM
Storing cookie in server side Sivamurugan PHP Programming 0 08-30-2007 08:50 AM
How to Perform SQL Server Row-by-Row Operations Without Cursors? oxygen Database Support 1 07-30-2007 01:22 AM
should validation occur server side or client side?why? prasath ASP and ASP.NET Programming 1 07-19-2007 03:09 AM


All times are GMT -7. The time now is 06:27 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0