My problem is quite simple: I'm writing a WinForms app in .net 4.0 C# in Visual Studio 2010 it works nicely on my computer.
It connects to a remote SQL Server database using System.Data.SqlClient's SqlConnection.
When the program loads the first form it runs the following code:
SqlConnection ACconnection = new SqlConnection(String.Format(
"Server=xxx.xx.xxx.xxx\\TEST;Database=REP01;User Id={0};Password={1};", User, Password));
private bool TestConnection()
{
try
{
ACconnection.Open();
lbl_connectionStatus.Text = "Server: Connected";
lbl_connectionStatus.ForeColor = Color.FromArgb(0, 150, 30);
ACconnection.Close();
return true;
}
catch (Exception ex)
{
Functions.GetError(ex);
return false;
}
}
I get the error:
SQL Network Interfaces, error: 26
My problem is that even though it is working fine on my computer it won't work nearly anywhere else. All the computers I've tried it are running on Windows 7 or 8, including mine.
I've googled the error, but all the answers focus on the server side, and since it's working fine from my computer I know it's not a server side problem.
Pravesh Singh
14-Aug-2014