I have a problem,I run application C# and I get a 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: 26 - Error Locating
Server/Instance Specified)
???
what?
thanks
The error message pretty much says it all: make sure the instance name is correct (if your SQL server is using instances) and make sure your server is configured to allow remote connections.
How to configure SQL Server to allow remote connections
How to connect to a server instance
Tip for troubleshooting your connection string:
Create a file named "testconnect.udl".
Double click the newly created file.
On the "Data Link Properties" dialog Switch to first tab "Provider".
From the list of providers select "SQL Native Client".
Click "Next>>".
Complete the following information according to your desired connection:
Data Source // your server name
User Name + Password; check "Allow saving passwords"
Initial catalog // your database name
Click "Test connection".
If the connection succeeds save the database link, clicking "OK".
Open the testconnect.udl file with a text editor of your choice and compare the information with your application connection string.
Check the protocols that are enabled for your server.
Run the Configuration Manager; you may need to enable TCP/IP.