Monday, August 14, 2006

SQL Server Default Values (or "Why Open Source Is (Still) Better")

In getting our Java app to run on Windows, I'm forced to use SQL Server as a database. (Against my will, I might add.) I have an external application that will be adding rows to a table via ODBC, and I'm thinking it'd be nice to have SQL Server automatically generate a date value for when the row was written. In PostgreSQL, it'd be a default value in the DDL (I think; I've never needed it yet), but I wasn't sure what it'd be in SQL Server, so I tried timestamp.

That didn't look right to me, as the value in Enterprise Mangler displayed as '<binary>', rather than the actual date. Okay, let's try datetime with a default value. Well, that complained about something odd. I googled and found that timestamp *is* what I want, display problems notwithstanding.

Which leads me to today's punchline: when I switched from datetime w/default to timestamp, and tried to save my changes, EM complained about a default value not being appropriate for that datatype. Why, on earth, did EM not clear the default value when I switched datatypes?!

Okay, maybe I'm reading too much into this, but this is a problem you just don't see in open source programs. In the O/S world, the first decent coder to hit that problem would have pulled down the source, fixed the problem, and submitted a patch. The next version of the program would be fixed, perhaps in less than a month, depending on the release cycle. Heck, I was itching to do it, myself, except, whaddya know, I can't get at the code.

But I'll wager that this problem will never get fixed. It's not "important enough" (i.e. to the marketing team) to make it into a bug list, unless it annoys a SQL Server developer enough to make it happen "while he's doing other things" (i.e. without permission).

Harumph. When will I be free of this nonsense?

Labels:

2 Comments:

Anonymous mp said...

I don't think big corporations will ever learn how much time and money they could save by switching to a open source/linux/unix type systems.

1:31 PM  
Blogger djaquay said...

Well, perhaps when the commercial players either go out of business or become Open Source players, they'll be forced to...

1:38 PM  

Post a Comment

<< Home