server| Data | database | database connection SQL Server port, we can through the server-side Network trial tool and client utility
To set, set the method is:
Use the server-side network trial tools and client utilities, respectively
Set the default port in-> TCP/IP-> properties for the protocol enabled by General Options->, assuming 1455
Then test your port for effectiveness and use
Telnet SQL Server address 1455
See if you can telnet, and if so, you can do the following tests
In the past, there is no port number in the writing, so it is better to write, but now change the port number, many friends are not very clear how to write the connection statement. The following database connection statement is the form after which the port is changed:
---------------------------------------------------------------------------------
Set oconn = Server.CreateObject ("ADODB. Connection ")
sconn = "Driver={sql Server}"; server= server address, 1455;database= database; uid= user name; pwd= password; "
oConn.Open sconn
Response.Write oconn
----------------------------------------------------------------------------------
The output results are:
----------------------------------------------------------------------------------
PROVIDER=MSDASQL.1; Extended properties= "Driver=sql Server; server= server address, 1455; uid= user name; pwd= password; App=internet information Services; wsid=**;D atabase= Database "
------------------------------------------------------------------------
This indicates that we have successfully connected the data!