Tuesday, June 23, 2009

Changing tables in SQL Server 2008/good UI design

I was using SQL Server 2008 client tools to make some database changes today ( you'll recall, if I install SS 2005, it reports success, but does not install client tools ). I usually prefer to create tables in script, so I can easily execute the script again when I deploy, but this was a simple one, and I figured I'd just use the table designer. I created my table, saved it, and realised I missed a column, so I went ahead and modified the table. Set up my column, hit save, and got the following dialog:

So, an empty table, and the program feels I need to be told that I can't change it, because it would require dropping the table. I don't see that this is even true, can't I add a column using SQL, so long as I provide a default value ( or the table is empty ), and there's no need for the DB to drop the table and recreate it ?

Assuming for a moment that I did have data in the table, and this action WOULD cause me to lose data, why not ASK me before proceeding, instead of locking me out ? And, if I need to change a preference, why not provide a way to open the preferences in the right section ? I NEVER tell a user in my software that they need to set a preference to do what they requested, without opening the preferences on the right page, to show them where it is.

I guess this tells me what I knew all along. Never use the tools, always hand write code, it's the only thing that you can trust.


  1. > Never use the tools, always hand write code,
    > it's the only thing that you can trust.

    Or write your own tools. You can always trust those... up 'till you forget how they're implemented.

  2. I had the same problem, I just disabled the option: http://chrisbarba.wordpress.com/2009/04/15/sql-server-2008-cant-save-changes-to-tables/

  3. Andy - thanks for the link. I confess that when the program did nothing to help me, I just grit my teeth and worked around it, instead of digging in to work out how to turn it off.

  4. I grit my teeth, and manually run an UPDATE command...