-
Dec 29th, 2012, 06:50 PM
#1
Thread Starter
New Member
Change the length of a field in a table
hyy
I am using sql2000 for my Database and vb6 for the platform app. I want to change the length of a field in Table A, but that particular field is related to another field in Table B, means, the field in Table B is dependent on the field in Table A.
When I tried to change the Length of the field in table A, using the query ALTER TABLE table ALTER COLUM [id] varchar(50), the analyzer returned the error
Server: Msg 5074, Level 16, State 8, Line 1
The object 'UQ__table A__77BFCB91' is dependent on column 'field'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE ALTER COLUMN field failed because one or more objects access this column.
On the other hand, when used the same query on the field in Table B, it did the trick.
How can I change the Length of the field in Table A.
Anyhelp is appreciated.
-
Jan 19th, 2013, 02:17 AM
#2
Re: Change the length of a field in a table
Well, it seems as if that there is a relationship between the fields in the two tables! That being the case I think the only way you can change the length of the field in table "A" to destroy the relationship between the two tables, change the length of the field then re-establish the link between the two tables.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 19th, 2013, 02:29 AM
#3
Thread Starter
New Member
Re: Change the length of a field in a table
yeah I know, this procedure can do me the trick. But the question is how to do it?
-
Jan 19th, 2013, 07:42 AM
#4
Re: Change the length of a field in a table
I assume that the mapping has some associated code if so could you please post it?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|