Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem With Cursors - Error 16958

Posted on 2004-04-03
2
Medium Priority
?
800 Views
Last Modified: 2012-05-04
we are using a cursor varying type as an output parm of one stored proc. when assigning the returned cursor for this Stored proc to a cursor variable in the calling stored proc and trying to fetch through it we have the following error:

Server: Msg 16958, Level 16, State 1, Line 20
Could not complete cursor operation because the set options have changed since the cursor was declared.

can any body help!
thanks in advance
0
Comment
Question by:moh_abbashar
2 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 1500 total points
ID: 10748305
Make sure that both procs are created using the exact same SET OPTIONS.  I've also had luck by using SET ARITHABORT ON

Brett
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 10749722
Could you post your code? I think you are missing output key word.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

876 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