SQL 2005 Express 2008 Express Compliant
I installed VS 2008 without SQL 2005, then I installed SQL 2008, then I needed 2005 express, so I reinstalled VS checking the SQL function. The installation went fine, however I still can't open the mdf files from VS. I think instance 2005v is not installed.
When I dbl-click the mdf file in VS, I get the following message: To connect to SQL Server (* .mdf) files, SQL Server Express 2005 is working correctly. Check the component installation or download it from the URL: http: go.microsoft.com/fwlink/?linkID = 49251.
Update
I tried to install it, it doesn't work. When I tried to connect it to SQL 2008, it doesn't work, when I try to connect it to SQL inside VS, I get the following error: There was a network related or instance specific error while establishing a connection to SQL Server. The server was not found or was not available. Verify the instance name is correct and configure SQL Server for remote connection. (vendor: SQL Network Interfaces, Error: 26 - Server / Instance Locating Error) I suspect SQL 2005 has no instance at all. I opened SS manager and I didn't see any installed instances.
I don't know how to install the instance, otherwise if there is a way to open from 2008, tell me.
Any help would be really appreciated!
a source to share
You don't just "open" the mdf file in Visual Studio - you need to "attach" the file to your SQL Server instance and then access it by creating a SQLConnection (System.Data.SQLConnection) from your VS app. See here for more See information about attaching databases (note the FOR ATTACH option) and here's a good introduction to accessing SQL Server data using SQLConnection.
Oh, and if you need to see anything about "custom instances", pretend not. It was supposed to make it easier to autocomplete databases (actually, database binding isn't that hard). Microsoft is warning that this feature will be discontinued in future releases of SQL Server, so you'd better learn the "right" way to do it.
a source to share