借来用用
1. do you have a firewall? if yes, make sure it allows packets to port 1433 to pass through2. use a connection string like (replace xxx.xxx.xxx.xxx with your IP):oConn.Open "Provider=sqloledb;" & _
           "Network Library=DBMSSOCN;" & _
           "Data Source=xxx.xxx.xxx.xxx,1433;" & _
           "Initial Catalog=myDatabaseName;" & _
           "User ID=myUsername;" & _
           "Password=myPassword"3. run Server Network Utility on your SQL Server, make sure TCP/IP protocol is enabled and the port is 1433 and "Hide Server" is unchecked in the Properties for TCP/IPif it still does not work, try4. run enterprise manager, right click on your server instance, open Properties page, go to Connection tab, make sure the checkbox next to "Allow other SQL Servers to connect remotely to this SQL Server...." is checked