Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2008-10-16 : 07:25:46
|
| Hello All,I have a Cursor, and iterating it by a loop with condition @@FETCH_STATUS=0but the loop is running for unlimited countspreviously the same loop was working fine but when I run another SP which was also using a Cursor and that SP gave me the error then I run this SP it also started giving error.Can any one help me?????Thanks in advance. |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-10-16 : 07:47:25
|
| Too many possible problems to guess at a solution.Please post the code for the cursor, and the stored proc in question.-------------Charlie |
 |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2008-10-16 : 11:09:26
|
| @@FETCH_STATUS is global to all cursors on a connection To retrieve the last fetch status of a specific cursor, query the fetch_status column of the sys.dm_exec_cursors dynamic management function.See:http://msdn.microsoft.com/en-us/library/ms187308.aspx |
 |
|
|
|
|
|