Cannot connect to SQL Server 2012
I'm trying to connect to a SQL Server 2012 database using C#, both the
server and program are on the same computer. When I try to connect I get
an exception:
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)
There is an inner exception simply saying {"The parameter is incorrect"}.
I'm trying to connect using this
SqlConnection sql = new
SqlConnection("Server=(local)\\MSSQLSERVER;Database=Test;User
ID=logger;Password=logger;Trusted_Connection=False");
sql.Open();
I have a SQL login called logger with the same text as the password and it
is mapped the database Test. I believe I have the server set up to take
remote logins.
Any ideas as to what I am missing?
Saturday, August 31, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment