SQL 2000 TIMEOUT ERROR WHEN TRYING TO CONNECT USING C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an application that runs fine on my machine(of course) that access the
local Sql Server. However, when trying to run this application from another
machine I receive a Sql timeout error. I thought it was my stored procedure
but that doesn't seem to be the case. The following are the connection
strings that I've tried:

//private string connstring = "integrated security=SSPI;data source=<ip
address>;"
// "persist security info=False;initial catalog=projectDB";

private string connstring = "pwd=<password>;uid=<username>;" +
"database=projectDB;server=<ip address>";

//private string connstring = "Data Source=<ip address>;" +
// "Initial Catalog=projectDB;" +
// "User Id=<username>;" +
// "Password=<password>";

Do anyone know how I can get over this hump? By the way I'm running the
application locally on the remote computer.
 
1. If the SQL Server and the app are not on the same computer, make sure the
SQL Server allows remote access.
2. Since you pass username/password in ConnectionString, make sure the SQL
Server has mixed security mode enabled (by default installed, only Windows
security mode is enabled).
 
I checked the Sql Server and it has Allow other SQL Servers to connect
remotely to this SQl using RPC. Is this what your were talking about?
 
OK, if the SQL Server is accessible from other computer, you then need to
make sure it does accept username/pasword pair (that is, mixed security mode
is enabled).
 
Back
Top