检查你的数据库是否能正常使用 和权限问题.   还有配置时的url和driver有没有写错. 
 细心点

解决方案 »

  1.   

    数据库能正常运行,SQL2000 权限一直都是默认的.url和driver我反复写了几篇报同样的错误.
      

  2.   

    在 Database Schema Provider 对话框中:       Driver :  weblogic.jdbc.mssqlserver4.Driver
              URL : jdbc:weblogic:mssqlserver4:pubs@localhost:1433
         Username : sa
         Password : sa
    Database name : weblogic:mssqlserver4:pubs@localhost:1433
        JNDI name : DataSourceOK 后弹出 Error 对话框的内容:
    Can't open a socket on Localhost:1433. Check host and port number and make sure the security manager allows this connection. You can also    try running the SocketApplet (java.net.ConnectException: Connection refused: connect).在 Error 对话框中选择 Stack Tace 按钮 内容为:
    See com.borland.dx.dataset.DataSetException error code:  BASE+66
    com.borland.dx.dataset.DataSetException: Can't open a socket on localhost:1433. Check host and port number and make sure the security manager allows this connection. You can also try running the SocketApplet (java.net.ConnectException: Connection refused: connect).
    at com.borland.dx.dataset.DataSetException.a(Unknown Source)
    at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
    at com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
    at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
    at com.borland.jdbcx.metadata.DatabaseInfo.openConnection(Unknown Source)
    at com.borland.jdbcx.metadata.d.run(Unknown Source)
    Chained exception:
    java.sql.SQLException: Can't open a socket on localhost:1433. Check host and port number and make sure the security manager allows this connection. You can also try running the SocketApplet (java.net.ConnectException: Connection refused: connect).
    at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:171)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34)
    at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:147)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
    at com.borland.jdbcx.metadata.DatabaseInfo.openConnection(Unknown Source)
    at com.borland.jdbcx.metadata.d.run(Unknown Source)创建CMP时所出的错误,数据库都正确.
    请高手指点..................
     
      

  3.   

    你用的是sql2000 你有没有另外装了sql2005 ??
      

  4.   

    没有啊!
    但是我的机子装了 VS2005 不知道是不是自带了 SQL2005 在程序中有这个启动文件