How To Use ADO to Connect to a SQL Server That Is Behind a Firewall (269882)
The information in this article applies to:
- ActiveX Data Objects (ADO) 1.0
- ActiveX Data Objects (ADO) 1.5
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q269882 SUMMARY
When you use ActiveX Data Objects (ADO) to connect to a SQL Server 7.0 or SQL Server 2000 server that is behind a firewall, consider the following:
- The firewall must be configured to permit port 1433 incoming (or the port numbers that SQL Server listens to on TCP/IP), and ports 1024 to 65535 outgoing.
- The connection string must specify the SQL Server address: the IP address, the server DNS name, or a name inside the hosts file.
- The connection string should specify the Network Library type, in this case "dbmssocn" (without the quotes) for TCP/IP Sockets Net-Library.
WARNING: Opening up the ports on the firewall may pose security issues; consult with your System Administrator or Security Administrator to configure the firewall.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
238949 How To Set the SQL Server Network Library in an ADO Connection String
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbhowto KB269882 |
---|
|