Invalid Cursor State Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam Evans

    Invalid Cursor State Error

    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?
  • Simon Hayes

    #2
    Re: Invalid Cursor State Error


    "Sam Evans" <sam.evans@fuch s-oil.com> wrote in message
    news:3fb4df1d.0 401070435.5eba4 784@posting.goo gle.com...[color=blue]
    > 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?[/color]

    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.flde pCode', 'fldRepCode', 'column'

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

    Simon


    Comment

    • Sam Evans

      #3
      Re: Invalid Cursor State Error


      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 ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...