SQL Server 2008 & Visual Web Developer 2008 express editions: Connection to DB Fail!

databasesql serversql-server-2008visual-studio-expressvisual-web-developer

So I saw this question/comment…

How to integrate SQL Server 2005 Express Edition to Visual Web Developer 2008 Express Edition

And this is EXACTLY what I am having trouble with, only using SQL Server 2008 express edition and Visual Web Dev 2008 express. Everytime I try to click to add a new database I get the exact same error code.

I tried the response on the other question, and this did not solve the problem for me.

PLEASE HEEEEEELLLPP!!! Thanks

EDIT:

I should note that these are installed on my home laptop for learning purposes.

The instance must have been a named instance, though I am not sure of what that is. When I load it up, and select the connect: the "server name" appear as 'JUSTIN-PC\SQLEXPRESS' though I am not sure this is what is referred to as the instance name.

I did try this though in the visual studio data connection field, and it did not work, so I am assuming this is not right. So I am reading help on it but really lost…although it looks like it probably assigned a named instance for me, though I do not know what that was.

Thanks for helping the rookies learn!!

Best Answer

If you adding a database to the App_Data folder (rather than creating the database in SQL Management Studio), you are probably getting a conflict between the version of SQL you have installed and the one that Visual Studio expects. This is my current situation at work where I have Visual Studio 2008 Team and SQL Server 2008 - because I do not develop using App_Data, it doesn't really bother me.

Couple of things to try:

  • Check if there are any service packs for your express edition
  • Try uninstalling everything, then install sql server, then install visual studio
  • Uninstall everything, let the express install sql server express for you
  • Create the database in management studio and using the server explorer, create your tables and whatever else in visual studio