Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Database/JDBC/SQL/JDO/Hibernate
» MS SQL
打印话题 寄给朋友 订阅主题 |
作者 | Re:jTDS JDBC Driver 1.0.2 released (for M$ SQL Server) [Re:why] |
huajiazhou
发贴: 14 积分: 0 |
于 2005-04-09 14:49
当我下载了jtds-1.0.2来连接我的SQL SERVER 2000数据库的时候出错了 主要源代码是: Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance(); String url="jdbc:jtds:sqlserver://localhost:1433/jspdev;user=sa;password=5696285"; Connection con= DriverManager.getConnection(url); Statement stmt=con.createStatement(); String inq="select * from book"; ResultSet rst=stmt.executeQuery(inq); 错误提示是: exception javax.servlet.ServletException: Network error IOException: Connection refused: connect org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.testMssql3_jsp._jspService(testMssql3_jsp.java:118) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) 怎么好像是网络错误啊 ??能告诉我是什么原因吗 ? 机器环境是这样的XP SP2,Tomcat 5.0,jtds-1.0.2,SQL SERVER 2000 学java的朋友,请一起来投票让sun推出中文jdk文档!!! |
话题树型展开 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |