SQL server after connecting to the firewall using ADO

xiaoxiao2021-03-06  63

SQL server after connecting to firewall [2004-11-30 8:42:37 AM | Author: HOKY.PRO | From: Original] SQL Server after using ADO to connect to the firewall When you use ActiveX Data Object (ADO) Connecting to the SQL Server 7.0 or SQL Server 2000 server after the firewall, consider the following:

Quoted from UNKOWN: • The firewall must be set to allow the connection 1433 to be connected (or the SQL server is connected by TCP / IP listening "and allows the connection 1024 to 65535. • The connection string must specify the address of the SQL server: IP address, the name of the server's DNS name or the name in the host file. • The connection string should specify the "Network Program" type, in this case, please use dbmsSOCN to represent TCP / IP Sockets Net-Library. WARNING: Opening the connection on the firewall may cause security issues, please contact your "System Administrator" or "Security Administrator" to set the firewall. Other related information In the following program code paraduse, ServerName should be the name of the server's DNS name, IP address, or host file:

Set Conn = createObject ( "ADODB.Connection") Set Rs = createObject ( "ADODB.Recordset") Set Cmd = createobject ( "ADODB.Command") Conn.Open "Provider = SQLOLEDB; Password = password; Persist Security Info = True ; User ID = username; Initial Catalog = DBNAME; Data Source = servername; Network Library = dbmssocn "cmd.ActiveConnection = ConnSQL =" select * from TABLE "cmd.CommandText = SQLSet Rs = cmd.Execute can not get used to the traditional look See English original: http://support.microsoft.com/kb/269882/EN-US? LN = EN-US & SD = GN & fr = 0

转载请注明原文地址:https://www.9cbs.com/read-86197.html

New Post(0)