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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 @@fetch_status is -1

Author  Topic 

bill_
Starting Member

38 Posts

Posted - 2010-05-21 : 11:37:45
What would cause @@fetch_status to be -1?
It was working ok before.

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-05-21 : 11:53:11
If the fetch statement failed for some reason then you get @@fetch_status as -1. This is one of the reason i know (there can be other reasons too).

Are you using while @@Fetch_status = 0 in your code ?

Just check the select statement in query analyzer..
Go to Top of Page

bill_
Starting Member

38 Posts

Posted - 2010-05-21 : 12:06:40
Thank you pk_bohra. Found the problem and it returns 0 now.
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-05-21 : 12:18:11
Glad to help
Go to Top of Page
   

- Advertisement -