SQL Server 2012
Thanks! We'll email you
when relevant content is
added and updated.
I'm having trouble connecting to SQL Server 2012 database using C#. I get the following error message when I try to connect:
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)
Note, both the server and software are on the same computer and I am using an SQL login called Logger, mapped to the database using the same text as the password.
I'm trying to connect using this:
SqlConnection sql = new SqlConnection("Server=(local)MSSQLSERVER;Database=Test;User ID=logger;Password=logger;Trusted_Connection=False");
I'm pretty sure I have the server set up to take remote logins. Any idea as to what I am missing?
September 23, 2013 1:09 PM
September 23, 2013 1:10 PM