July 3, 2002 at 8:46 am
We are getting an error while running a stored procedure,
This is not the exact error but it is roughly:
'cannot complete cursor operation because table schema changed after cursor declaration'
Any ideas as to what causes this?
Thanks,
Eddie
July 3, 2002 at 10:18 am
Does this happen everytime?
Can you post the table DDL and the stored proc?
Steve Jones
July 3, 2002 at 11:23 am
yes, every time, the stored procedure is in a group of several stored procedures so I can't just paste in the code as I could be anywhere down a number of roads in the procedures.
Thanks,
Eddie
July 3, 2002 at 12:32 pm
You'd have to check through them. Somewhere down the line, I suspect that the table is being altered in some way. Is this with a temp table?
Steve Jones
July 3, 2002 at 1:30 pm
Well, the strange thing is, we are creating some temp tables (I don't think they are true temp tables) but based on the parameters we are sending to the sp, that part of the code should not even run but when we comment those parts out, we don't get the error.
Eddie
July 3, 2002 at 2:28 pm
You may need to do a Profiler trace and look at T-SQL statement starting/completing to see if for some reason you are navigating those paths.
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
July 3, 2002 at 3:37 pm
I've seen that a couple times, at the time I suspected it had to do with index changes being made, but didnt definitely corrolate the two.
Andy
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply