Because there is a bug in Management Studio. It will be fixed at the latest
in SQL Server 2008; in the meantime, you will either have to live with it,
or use CREATE TABLE in a query window instead of the table designer (which
has about 50 other bugs, FWIW). Here are three issues relating to your
problem:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=127135
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=278074
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125878
The last one suggests the bug was being considered for SP2, but I don't
think it made the bar. One of the others suggests that it has been fixed in
an early Katmai CTP. Have you updated your client tools to SP2 or better?
What does Help|About... in Management Studio tell you (the first row under
the Versions column)?
A
> Why is it that when I create a varchar column in a table through the
> SQL Server 2005 Management Studio and assign it a length of, say, 10,
> when I tab to the next field, the length is changed back to 50? If I
> return to the column type field and correct it, it works fine.
Richard Carpenter - 20 Mar 2008 03:51 GMT
I'm sure that's it, Aaron. This is a new install of the client tools,
and I have yet to update them with SP2.
Thanks!
--
Richard Carpenter
On Mar 19, 7:42 pm, "Aaron Bertrand [SQL Server MVP]"
<ten....@dnartreb.noraa> wrote:
> Because there is a bug in Management Studio. It will be fixed at the latest
> in SQL Server 2008; in the meantime, you will either have to live with it,
[quoted text clipped - 22 lines]
>
> - Show quoted text -
Uri Dimant - 20 Mar 2008 09:45 GMT
Richard , I could not reproduce the bug , can you tell me what did you do
step by step?
I'm sure that's it, Aaron. This is a new install of the client tools,
and I have yet to update them with SP2.
Thanks!
--
Richard Carpenter
On Mar 19, 7:42 pm, "Aaron Bertrand [SQL Server MVP]"
<ten....@dnartreb.noraa> wrote:
> Because there is a bug in Management Studio. It will be fixed at the
> latest
[quoted text clipped - 29 lines]
>
> - Show quoted text -
Aaron Bertrand [SQL Server MVP] - 20 Mar 2008 14:00 GMT
Uri, I can reproduce this at will quite easily in Microsoft SQL Server
Management Studio 9.00.3042.00.
In any database, right-click "Tables" in Object Explorer, and select "New
Table..."
In Column Name type "foo", then hit Tab and in Data Type type "varchar(10)"
and hit Tab. varchar(10) should change to varchar(50).
A
> Richard , I could not reproduce the bug , can you tell me what did you do
> step by step?
Uri Dimant - 20 Mar 2008 14:12 GMT
Thank you Aaron, I was able reproduce it too. As I see it is happening only
for the first time ( also Click change to varchar(50)) I mean if you go back
and change it again to VARCHAR(10) then SQL Server DOES save it, am I
right?
PS. Microsoft SQL Server Management Studio 9.00.3042.00.
> Uri, I can reproduce this at will quite easily in Microsoft SQL Server
> Management Studio 9.00.3042.00.
[quoted text clipped - 9 lines]
>> Richard , I could not reproduce the bug , can you tell me what did you do
>> step by step?
Aaron Bertrand [SQL Server MVP] - 20 Mar 2008 14:11 GMT
> Thank you Aaron, I was able reproduce it too. As I see it is happening
> only for the first time ( also Click change to varchar(50)) I mean if you
> go back and change it again to VARCHAR(10) then SQL Server DOES save it,
> am I right?
Yes, that seems right. But the user shouldn't have to override (50) twice.
Uri Dimant - 20 Mar 2008 14:20 GMT
> Yes, that seems right. But the user shouldn't have to override (50)
> twice.
100% , I hope to see they fixed it in SP3 , I so hope.......
>> Thank you Aaron, I was able reproduce it too. As I see it is happening
>> only for the first time ( also Click change to varchar(50)) I mean if you
[quoted text clipped - 3 lines]
> Yes, that seems right. But the user shouldn't have to override (50)
> twice.