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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Cursor problem (yeah I know)

Author  Topic 

btrimpop
Posting Yak Master

214 Posts

Posted - 2002-07-05 : 10:47:18
Has anyone run into this or know of a reason why?

I'm getting the following error:

"Could not complete cursor operation because the table schema changed after the cursor was declared"

Problem is there is nothing in the system (stored procedures or app) that changes any of the table schema's that are used in the cursor. The only odd part of this is that some code was added in the stored procedure where this error is occuring that creates a new table for some new processing and then drops the table when it's done. The cursor in question does not use this new table. The new table is separate from the cursor operations but that's the only change that's been made to something that used to work!?

Any ideas other than don't use a cursor?

Thanks

"In theory there is no difference between theory and practice. But in practice there is!"



btrimpop
Posting Yak Master

214 Posts

Posted - 2002-07-05 : 10:48:52
oh sorry, this is SQL 7 Service pack 3 running on an NT 4.0 local workstation if that helps at all.

Thanks

"In theory there is no difference between theory and practice. But in practice there is!"



Go to Top of Page

M.E.
Aged Yak Warrior

539 Posts

Posted - 2002-07-05 : 10:54:19
A) Don't use a cursor
heh, sorry.. had to be said again.


That aside, I don't recognize the error from that code, could you post your cursor declare statement and the lines that load data into it?

-----------------------
Take my advice, I dare ya
Go to Top of Page
   

- Advertisement -