首页上一页 1 下一页尾页 3 条记录 1/1页
《java项目开发全程实录》 第4章酒店管理系统 数据库问题麻烦请教下
发表在Java图书答疑
2011-03-08
是否精华
是
否
版块置顶:
是
否
使用另一帖子中,提供的SQL2000数据模型,添加去了,msbase.jar、mssqlserver.jar、msutil.jar三个文件也添加进库了,但运行还是有错,貌似是数据库方面的,麻烦能解答一下吗
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(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.mwq.dao.JDBC.getConnection(JDBC.java:37)
at com.mwq.dao.BaseDao.longHaul(BaseDao.java:101)
at com.mwq.dao.BaseDao.main(BaseDao.java:121)
Exception in thread "main" java.lang.NullPointerException
at com.mwq.dao.BaseDao.longHaul(BaseDao.java:103)
at com.mwq.dao.BaseDao.main(BaseDao.java:121)
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(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.mwq.dao.JDBC.getConnection(JDBC.java:37)
at com.mwq.dao.BaseDao.longHaul(BaseDao.java:101)
at com.mwq.dao.BaseDao.main(BaseDao.java:121)
Exception in thread "main" java.lang.NullPointerException
at com.mwq.dao.BaseDao.longHaul(BaseDao.java:103)
at com.mwq.dao.BaseDao.main(BaseDao.java:121)