I installed VS2010 Express Edition which installed SQL Server 2008 Express edition along side. But I was failing to add a connection to the SQL Server 2008 Instance from Visual Web Developer. I was getting the notorious error 40 on my Windows 7 Ultimate.
Searching the web came up with too many details. I went through them and tried them one by one blindly as I am new to the .NET platform.
Finally, what worked for me is to download and install SQL Server 2008 again, this time with the default instance name. Then in Visual Web Developer, I navigated to Tools > Options. I checked the “Show all settings” box to view all the options. In the Database Connection section, I removed the existing value. An empty field falls back to the default value.
That did the trick for me. I can now connect and create databases using the Visual Web Developer 🙂