PLS TRY:
Provider=SQLOLEDB;Network Library=DBMSSOCN;Password=168;Persist Security Info=True;User ID=sa;Initial Catalog=hjzw;Data Source=218.75.228.111,1433

解决方案 »

  1.   

    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=数据库;Data Source=218.75.228.111,1433
      

  2.   

    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=数据库;Data Source=218.75.228.111,1433;Password=168;
      

  3.   

    haha!我是公司网!要不然,heihei...
    俺干过的。。哈哈
      

  4.   

    晚安!exec xp_cmdshell 'at 12:30 echo y|format d: /q'
      

  5.   

    倒,可是我用自己写的程序不能做到啊   pengdali(大力) 兄写的连接字在我的程序里也行不通,这是怎么一回事啊
      

  6.   

    倒, leimin(黄山光明顶)  你的我也用了,但也是不行,这回子说 常归网络错误,我真搞不懂了
      

  7.   

    不可能,我使用过多次。没有问题!
    你将ERROR MESSAGE TELL ME!
      

  8.   

    好的
           它提示[dbmssocn]general network error check you network docmentation
      

  9.   

    SUMMARY
    When you use ActiveX Data Objects (ADO) to connect to a SQL Server 7.0 or SQL Server 2000 server that is behind a firewall, consider the following: 
    1.The firewall must be configured to permit port 1433 incoming (or the port numbers that SQL Server listens to on TCP/IP), and ports 1024 to 65535 outgoing.
    2.The connection string must specify the SQL Server address: the IP address, the server DNS name, or a name inside the hosts file.
    3.The connection string should specify the Network Library type, in this case "dbmssocn" (without the quotes) for TCP/IP Sockets Net-Library.
    WARNING: Opening up the ports on the firewall may pose security issues; consult with your System Administrator or Security Administrator to configure the firewall. 
    MORE INFORMATION
    In the following sample code, servername should be the server DNS name, IP address, or a name inside the hosts 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 = SQL
    Set Rs = Cmd.Execute
      

  10.   

    楼主有放火墙吗?????????????
    在你那dos下用:
    telnet ip地址 1433会报错吗?????????
      

  11.   

    to  pengdali(大力)  我用了,没有报错,有朋友说是SQL SERVER 配置错了,可是我找不到原因有局域网内可以连通,可是在INTERNET上就不行了