Wenn ich zu SQL Server zu verbinden versuchte, mit dem folgenden CodeVerbindung zu SQL Server mit Windows-Authentifizierung
SqlConnection con = new SqlConnection("Server= localhost, Authentication=Windows Authentication, Database= employeedetails");
con.Open();
SqlCommand cmd;
string s = "delete employee where empid=103";
ich die folgende Fehlermeldung erhalten:
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)
SQL ist nicht konfiguriert folgen Remote-Verbindungen zu ermöglichen. – Greg
es ist auf dem localhost, nicht viel Remote darüber. – ps2goat
Guter Punkt. Verbindungszeichenfolge ist falsch. – Greg