1

Using Visual Studio 2010 10.0.20319.1 RTMRel and SQL Server Express 10.50.1600.1 I'm trying to add a new SQL Server Database .mdf, however, I receive the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 – Connection string is not valid)

I have enabled TCP/IP and Named Pipelines, added Firewall Exceptions for Sql Server, I am successfully connecting from VS in the Server Explorer window.

I would appreciate if someone can pint me to a solution to my problem.

Thank you.

2
  • The error says that your connection string is not valid. So, check your connection string. If you're not sure what to look for, then post your connection string. Commented May 9, 2010 at 21:58
  • I start blank, I do not have any connection string set up; none that I know of anyway. Commented May 10, 2010 at 12:36

2 Answers 2

1

I think that SQL Server must be running locally to be able to create those databases.

  • I was getting the same error
  • Started my local .\SQLEXPRESS instance
  • no more error, and a cute .mdf file was created
Sign up to request clarification or add additional context in comments.

1 Comment

I cannot verify the answer anymore, but I'll give a plus :)
0

According to your error

(provider: SQL Network Interfaces, error: 25 – Connection string is not valid)

check here what your connection string should look like

http://www.connectionstrings.com/sql-server-2008

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.