hello ,everyone.
i happened an matter about my program.
the  code  frag  like :
*************************
    String user = "asd";
    String password = "asdddt";
    String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String url="jdbc:microsoft:sqlserver://192.168.12.63:1433;DatabaseName=test";



    ConnectionParam param = new ConnectionParam(driver, url, user, password);
**********************
ConnectionParam is a class establishing connection,that it can run well for oracle 
jdbc driver.
i had make the msbase.jar located the proper directory,etc.
but the code not run well.192.168.12.63 is the ip of my localhost, 
if change "192.168.12.63"  to "localhost ",the same exception occur.
all exception message are below:
**********************************
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing 
socket.
 at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
 at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
 at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
 at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
 at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
 at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
 at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
 at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at java.sql.DriverManager.getConnection(Unknown Source)
 at connectionpool._Connection.<init>(_Connection.java:44)
 at connectionpool._Connection.getConnection(_Connection.java:108)
 at connectionpool.ConnectionFactory.<init>(ConnectionFactory.java:67)
 at connectionpool.testmypool.main(testmypool.java:84)
*******************************************
someone said it is not correct connecting the sqlserver db,but i can login and operate 
the db using SQL Server Enterprise Manager.
why?
how will i can do?

best my respect.

Reply via email to