View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 08:26 PM
Simon Hayes
 
Posts: n/a
Default Re: Invalid Cursor State Error


"Sam Evans" <sam.evans@fuchs-oil.com> wrote in message
news:3fb4df1d.0401070435.5eba4784@posting.google.c om...
> 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
> it or avoid it?


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


Reply With Quote