The "@@Cursor_Rows" is getting me  "-1"????

Posted on 2003-03-24
Medium Priority
Last Modified: 2008-02-20
When I use the @@CURSOR_ROWS global variable in SQL Server, it is getting me -1 as an answer, although I know that the cursor returns more than 1 row.
I tried to change the setup configuration in sp_configure, but it did not work.

Is there a setup variable that I must know about so that it works properly?

Question by:arida
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

xenon_je earned 300 total points
ID: 8193611
Can you post your cursor? If the last opened cursor is a dynamic one, than its normal that the @@CURSOR_ROWS is -1.

So please post the cursor you try to open.
thx... xenon
LVL 13

Expert Comment

ID: 8193642
Open your cursor as static. Now it can accumulate changes from other users, so it cannot return an accurate rowcount.

Expert Comment

ID: 9275610
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 12

Expert Comment

ID: 11183669
No comment has been added to this question in more than 268 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: xenon_je http:#8193611

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question