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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

static cursor vs dynamic cursor

Status
Not open for further replies.

Saama5

Programmer
Jan 6, 2002
52
US
I opened a table using static cursor and it was failing to pick at 600000 record. If i used query to get 599999 records it was working but as soon as I increase it by one more, it failed. With 600000 record query I used dynamic cursor it started working.
Can anybody help me to know the reason?
 
It seems there is an issue with the size of result set returned by a static cursor:
According to MSDN, "Static cursors are built in tempdb when the cursor is opened. They always display the result set as it was when the cursor was opened. They never reflect changes to the data. SQL Server static cursors are always read-only. Because a static server cursor is built as a work table in tempdb, the size of the cursor result set cannot exceed the maximum row size allowed by SQL Server."

________________________________________________________________________________
If you do not like change, get out of the IT business...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top