Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ODBC for SQL Server connection

Hi, I am trying to use the ODBC Data Source Administrator to create a datasource to grab info from a database on another server. Creating the System DSN, I choose Add and then SQL Native Client. I put in the correct machine name (which can be pinged), the correct user name and password (sa and it's password) - on the database server, it has TCP and Pipes enabled, as well as remote connections. But the "Connection is actively" refused keeps coming up. Why is this?

Thanks,
James
[499 byte] By [JimmyFo] at [2007-11-11 7:55:17]
# 1 Re: ODBC for SQL Server connection
Do you have any SP2/Other Firewall enabled?
Is the SQL server service running on the remote PC?
Is SQL Server running on the default 1433 port?
Are you connecting to a default or named instance of SQL Server?
Does the connection work if you set it up on the database server?

NB: In most cases you don't need to use an ODBC connection to connect to a SQL server database.
e.g.
Provider=sqloledb;Data Source=servername;Initial Catalog=pubs;User Id=sa;Password=password;
Wiseman82 at 2007-11-11 23:47:26 >