Installed tools:(VS 2008sp1, sql 2005 express, sql 2005 server, Asp.net MVC)
Today when I was going to Add a new mdf database file, I got the following error:
“Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component ...”
After searching for google, the problem solved, here’s they are
Navigate to “Tools” --> “Option” --> “Database Tools ” -->“Data Connections ->“SQL Server Instance Name (Blank for default): In the TextBox, I found it was “datasvr1” which is another computer’s name.
Whatever I left it blank or changed it to “./SQLEXPRESS”, it didn’t work.
Then I found another one says:
“I then happened to notice in SQL Server Configuration Manager that the SQLEXPRESS SQL Server service showed “NT AUTHORITY/NetworkService” under “Log On As” while MSSQLSERVER (the SQL Standard Edition service) showed LocalSystem. Right click on the SQLEXPRESS service, click Properties and then select Local System from the built-in account dropdown. Please note that in your situation using this account may not be an option due to security and/or network connectivity.”
Following the instruction he metioned, then I also found in the “SQL Native Client Configuration”, the alias name was also datasvr1, which must be Design1 in my situation.
The problem still exist….
Finally I changed the data instance name in the Tools -> Options….. of visual studio 2008 to SQLEXPRESS, without the prefix of “./”, All things went OK, haha.