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
 Transact-SQL (2000)
 t-sql question

Author  Topic 

SQLLearner2
Starting Member

14 Posts

Posted - 2006-06-03 : 18:47:02
I have a t-sql script that I'm trying to run in query analyzer. It has a cursor in it. Within the code I'm doing a table update where 'current of cursor'. I'm getting a message saying the cursor is 'read only'. The cursor is declared with the scroll_locks option. Any idea why I would be getting this message?

nr
SQLTeam MVY

12543 Posts

Posted - 2006-06-03 : 19:00:23
sounds like you have something not updatable.
Do you have permissions on the table?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

SQLLearner2
Starting Member

14 Posts

Posted - 2006-06-04 : 21:47:58
Yes. The ID i'm using is the table owner.
Go to Top of Page

cmdr_skywalker
Posting Yak Master

159 Posts

Posted - 2006-06-05 : 02:33:54
can you paste the code?

May the Almighty God bless us all!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-05 : 04:10:47
Post the code you used. There can be better method than Cursor

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-05 : 05:16:10
have you specified FOR UPDATE in the declaration?

-------
Moo. :)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-06-05 : 05:18:39
and why do you use a cursor?

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page
   

- Advertisement -