version problem access sql sever?

G

Guest

<add name="SQL Server" providerName="System.Data.SqlClient"
connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Databases\MyData.mdf;Integrated Security=True;User Instance=True" />


i have visual studio 2005 pro and sql server 2005 pro.

i got an error "An error has occurred while establishing a connection to the
server. When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified)"

what will i need to change in the connection string?
 
B

bruce barker \(sqlwork.com\)

you are doing a local connect, so remote is not a problem. your connection
string require a sqlexpress instance be installed (and running) on the local
machine and named SQLEXPRESS.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top