first, if you want to remotely access SQL Server 2000 directly (remember to do so), you must understand port 1433, which is the default port of SQL Server, port 1433 is the external service port provided by SQL Server. You can understand it as allowing remote access to the port.
perform three steps
1: ping the server address
in the DOS environment of a client, ping the Server IP address to check whether the network is smooth
2: If condition 1 is correct, check the network port status of the server
in the DOS environment of the server, enter netstat-An to check whether the server is listening on port 1433
If the state of port 1433 is listening (listen, listener), it indicates that port 1433 is enabled on the server.
3: If condition 2 is OK, check whether remote logon is allowed
enter the telnet server IP address 1433 in the DOS environment of a client
If the cursor flashes, the remote logon is successful;
write
string strconn = Server IP address in the connection string of Code ; database = Name of the SQL Server 2000 database server on the server; uid = Account; Pwd = password;