I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.
I have two SQL Server instances installed.
1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)
But when i try to add a database to my VS website project I get the following error:
Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925
I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)
and changed the "SQLEXPRESS" to "USERLT\SQL2005".
But I still get the same error message. Any ideas how i can resolve this issue?
Attach the files to your SQL server instance using for example the SQL management Studio and change your connectionstring to connect into this database.
Well the thing is that I dont have a database created yet. I am trying to create a new database. If i create a database in SQL 2005 then my connectionstring will point to the database on sql server. I need the database to reside in the VS project like a stand alone .mdf file so that I can deply the database with my project.
Does that make sense? Thanks for your help.
You may open your Machine.Config file (the file is in %SystemRoot%\Microsoft.NET\Framework\ver. number\CONFIG ). Try to find the ConnectionString node, modify the setting and make it look like
<add name="LocalSqlServer" connectionString="data source=UserLT\SQL2005;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
<add name="LocalSqlServer" connectionString="data source=.\MSSQLSERVER;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
Pasted above is the connectionStrings portion of my machine.config file. I changed data source=.\MSSQLSERVER from SQLExperess. However, I still cannot fix my issue. Am I using incorrect syntax?
Hello, I just had SQL Server 2005 installed over my old SQL 2000 , and I am experiencing the same problem when I try to create a new mdf file in my App_Data. I am curious if anyone has the solution to this problem?
no i couldn and still having the same problem. In fact it says "connections to SQL server files(*.mdf) requires sql server express 2005 to function properly. Please verify the installation of the component or download from the url: http://go.microsoft.com/fwlink/?linkId=49251" .And i am using sql management studio 2005
As far as i know a .mdf file is not supported by SQL Server 2005 only SQL Server Express.
I tryed in Tools>Options>DataBase tools>Data Connection>Sql Server Instance Name as blank i.e, (blank for default)
And worked me fine..
Replacing the entry in Machine.Config didn't work.
I found two copies of machine.config on drive c:\ I modified both entries by changing the server name. I still get exactly the same error.
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.
Of course, I also replaced the server name in the projects web.config file.
This is just bizarre. PS. The server I want to use is a SQL 2008 developer instance. All my *.config files refer to that.
It just gets more and more facinating.
I restared the machine and logged on as a different user.
The machine.config entries were both OK (using the name of my new Sql 2008 Developer server).
Attempting to add a new database still gave the same error.
I noticed that there were also:
'machine.config.default' files still had the name of the defunct server (SQLEXPRESS). I changed it.
I created a new web project. The web.config of the new project was still referring to "SQLEXPRESS" as the ApplicationServices connectionString. Where is it getting SQLEXPRESS from?
"Add New Item, Data, Sql Server Database" still gives the same error message.
By this time I'd completely lost confidence in my ability to control my computer. I did a global search for the string "SQLEXPRESS" on drive C:
There were 74 files, 7 folders found. Which of these bastards is the culprit? Or is the fault to be found in the registry? If so where? and why?