Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Posts
    2

    Unhappy Unanswered: Error -2147217900 (or 80040E14 in Hex)

    Hi all, this is my first post here.

    I'm trying to execute the following sentence:

    ALTER TABLE LIBRE2 ALTER COLUMN DAT001 varchar(5)

    getting the following error:

    Error in ALTER TABLE ALTER COLUMN DAT001. PRIMARY KEY CONSTRAINT aaaaaLIBRE2_PK has access to this column.

    I'm using Visual Basic 5.0 over an SQLServer 7.0 database.

    It seems to be an error with the index of the table, but I need to make this change inorder to solver other problems I have, and I need to do this operation by code, not with de tools of the SQL Server. Does anyone knows any workaround to solve this problem?

    Thanks in advance!!

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    You will have to drop the constraint first, alter the column, then reenable the constraint. Is this a 24/7 database ? Also, is this being used as a foreign key constraint in other tables ?

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    What other problems are you having ?

  4. #4
    Join Date
    Dec 2002
    Posts
    2

    Cool All right

    After analyzing the problem I reached the same solution, so I make the process just to make a few changes before altering the table. Not only remove the constraint, but also check if the field was a primary key or foreign key, but it just give me a new implementation problem, but I'm solving it. After the holidays I think I'll solve it all.

    Thanks a lot!

  5. #5
    Join Date
    Feb 2002
    Posts
    2,232
    Your welcome. Good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •