Friday, February 17, 2012

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!!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 ?|||What other problems are you having ?|||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!|||Your welcome. Good luck.

No comments:

Post a Comment