When living on the edge (read: running the latest betas of everything) as I do, you get trouble from time to time. This time it was Visual Studio 2008 "Data Dude" combined with SQL Server 2008. For those of you not familiar with it, "Data Dude" is an extension to Visual Studio for working with databases; unit testing of your database, automatic data generation etc.
My problem was that I kept getting a message saying "Object reference not set to an instance of an object." all the time when I tried to create a new database project. I suspected that SQL 2008 was the cause, and I was right. It turns out that "Data Dude" creates a temporary database when you're opening or creating a project. In my case this happened in the default SQL Server instance on the machine, which is SQL Server 2008 CTP5 Dev Edition. "Data Dude" didn't like that very much.
The solution (at least in my case) was to configure it to use the installed SQL Server 2005 Express Edition instead. You do that by going to Tools -> Options -> Database Tools -> "Data Connections" and "Design-time Validation Database". Fill in the instance name of a SQL 2005 instance in the text boxes. So now you know!
Remember Me
Page rendered at Tuesday, January 06, 2009 11:00:28 PM (W. Europe Standard Time, UTC+01:00)
Hans Olav Norheim is a Microsoft Student Partner, certified database and application developer, studying databases at the Norwegian University of Science and Technology in Trondheim, Norway. Hans Olav is especially passionate about Microsoft SQL Server and has interned on the SQL Server development team in Microsoft's HQ in Redmond two summers. When not in front of his computer, Hans Olav can be seen up in the sky flying a glider, climbing a rock, in a boat or out with friends.
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.