SQL Server port, we can set the Server-side Network Trial Tools and "Client Utilities", the setting method is: Use the Server-End Network Trial Tool "and" Client Utility "Settings" General Options "->" Enabled Protocol "->" TCP / IP "->" Properties "in the default port, assuming 1455
Then test if your port is getting up, you can use the Telnet SQL server address 1455 to see if you can Telnet, if you can, you can do the following test past writing, there is no port number, so it is better to write, but now Changed the port number, many friends are not very clear how to write the connection statement. The following database connection statement is the form after changing the port: ------------------- -------------------------------------------------- ------------ SET OCONN = Server.createObject ("AdoDb.Connection") sconn = "driver = {sql server}; server = server address, 1455; database = database; uid = username ; PWD = password; "Oconn.open SconnResponse.Write Oconn ------------------------------------- ---------------------------------------------
The output is: ---------------------------------------------- ------------------------------------ provider = msdasql.1; extended Properties = "driver = SQL Server ; Server = server address, 1455; UID = user name; PWD = password; app = Internet information services; wsid = **; database = database "------------------------------------------------------------------------------------------------ -------------------------------------------------- ---- This shows that we have successfully connected data!