SQL 2000 TIMEOUT ERROR WHEN TRYING TO CONNECT USING C#

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.
 
N

Norman Yuan

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).
 
G

Guest

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?
 
N

Norman Yuan

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top