MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » 请问jdbc数据库连接有关问题

请问jdbc数据库连接有关问题(2)

www.MyException.Cn  网友分享于:2013-09-12  浏览:9次

com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown   Source)
com.microsoft.jdbc.base.BaseConnection.open(Unknown   Source)
com.microsoft.jdbc.base.BaseDriver.connect(Unknown   Source)
java.sql.DriverManager.getConnection(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:171)
org.apache.jsp.tep3_jsp._jspService(tep3_jsp.java:80)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
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:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.28   logs.

说明:jdbc三个驱动文件已复制到F:\Tomcat   5.0\common\lib下

------解决方案--------------------
SQLServer2000下载补丁SP3或SP4打上就可以了
------解决方案--------------------
http://wstatic.xunlei.com/web/download.htm?cid=E56854A62158F7C179AB2799300A5EB501A8A506

这下sp4
------解决方案--------------------
修改:
out.print(result.getString( "username "));

if(result.next()){
out.print(result.getString( "username "));
}else{
out.print( "-------no data ");
}
------解决方案--------------------
String isCorrect= "select * from users where userid= ' " + id + " ' and password= ' " + psw + " ' ";
改为
String isCorrect= "select * from users where userid= " + id + " and password= ' " + psw + " ' ";
还有就是
out.print(result.getString( "username "));
改为
if(result.next())
{
out.print(result.getString( "username "));
}
else
{
out.print( "没有此用户和密码 ");
}
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有