Kiedy próbuje połączyć się z SQL Server za pomocą następującego kodułączenia się z SQL Server przy użyciu uwierzytelniania systemu Windows
SqlConnection con = new SqlConnection("Server= localhost, Authentication=Windows Authentication, Database= employeedetails");
con.Open();
SqlCommand cmd;
string s = "delete employee where empid=103";
pojawia się następujący błąd:
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 nie jest skonfigurowany do umożliwienia połączeń zdalnych. – Greg
jest na lokalnym hoście, niewiele o tym rozmawia. – ps2goat
Dobra uwaga. Ciąg połączenia jest nieprawidłowy. – Greg