Category: SQL Server

FluentNHibernate and SQL Date Generation

FluentNHibernate and SQL Date Generation

So you’d like your SQL entry to have a system generated date/time, eh? Here is a sample table:

To spare you hours dealing with this error:

What you need to do is to use the following mapping for...

T-SQL MERGE: My New Friend

T-SQL MERGE: My New Friend

As I was catching up on SQL 2008 this morning, I spent some time working with the T-SQL MERGE command, new in SQL 2008. Most of the blogs and examples online are a bit terse, so I decided to write...

FOR XML Needs More Love

FOR XML Needs More Love

I’m constantly amazed by the number of developers who have never worked with FOR XML EXPLICIT and the new FOR XML PATH.  If I were designing data access, it would be my go-to commands for building queries for complex data...

Dynamic SQL: Yea or Nay?

Dynamic SQL: Yea or Nay?

I’ve always been on the side of stored procedures in the classic debate over the merits of dynamic SQL.  In reality, I can only think of one good scenario where dynamic SQL at the application layer should be used: programmatic batch...

Working With SQL Server Compact Edition 2005

Working With SQL Server Compact Edition 2005

One interesting issue that I just solved involved how to specify the location of the database file for a SQL Server Compact Edition 2005 connection string in a .Net add-in for Microsoft Office. You see, when the add-in starts, it...

Updating Reporting Services 2000 Connection Info

Updating Reporting Services 2000 Connection Info

If you’re running Reporting Services 2000 and you accidentally change the password or remove the original account used by Reporting Services, you will have to update this information. With Reporting Services 2005, there’s a nice GUI utility that you can use to...

ContentTypeIds In WSS3

ContentTypeIds In WSS3

In WSS3, if you execute the following SQL:

You will notice that the content types are represented in the output as hex. If you take a look at the table definition, you’ll see that the actual data type of...

Fun in Philly

Wow, I had a lot more fun in Philly than I thought I would have. Back up a bit.  I had originally registered for the Microsoft launch event in Philly as a participant a few weeks back.  Last week, Rich,...