struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "asd" <liurx...@hotmail.com>
Subject an general exception about jdbc for sqlserver200
Date Thu, 15 Apr 2004 02:02:46 GMT
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.
Mime
View raw message