Groups | Blog | Home
all groups > sql server (alternate) > january 2004 >

sql server (alternate) : Invalid Cursor State Error


sam.evans NO[at]SPAM fuchs-oil.com
1/7/2004 4:35:25 AM
I know other people have posted stuff like this before, but I am still
to see a definitive answer. I have created a table in Enterprise
manager called tblUsers. I later added a column in EM and saved the
change. I then noticed I had misnamed the column, so I renamed and
when I tried to save the change I got the following message:-

'tblUsers' table
- Unable to rename column from 'fldepCode' to 'fldRepCode'.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state


This is now regularly happening to me, and I am tired of having to
recreate tables.

I am using SQL Server 2000 with all the latest service packs and
patches. Has anyone any idea what is causing this and how I can cure
Sam Evans
1/7/2004 1:49:28 PM

Many thanks for the quick reply. I know I should use the best method,
not the simplest, but i resent having to remember any syntax, however
simple, when I already have a tool that's supposed to do the job! The
best answer would be for me to write a little vb.net app that will let
me choose a stored procedure, prompt me for parameters and run the SP.
Guess what, I already have one! A quick hack beckons!


*** Sent via Developersdex http://www.developersdex.com ***
Simon Hayes
1/7/2004 1:50:46 PM

[quoted text, click to view]

Enterprise Manager's visual design features have a bit of a history of
similar issues; the best solution is probably to use Query Analyzer:

exec sp_rename 'SomeTable.fldepCode', 'fldRepCode', 'column'

Personally, I would prefer to use QA for this sort of task, as it allows for
more control and precision.

Simon

AddThis Social Bookmark Button