高手帮我看看jsp与access数据库连接问题
下面是我的代码 <%@ page contentType="text/html;charset=gb2312" %> <%@ page import ="java.sql.*" %> <html> <body> <form action="newresult.jsp" method=post><b>输入要修改信息的书名:</b><br> <input type=text name="name">
修改作者:<input type=text name="witer">
修改系列:<input type=text name="xilie">
修改价格:<input type=text name="pice"> <br><input type=submit name="b" value="提交修改"><input type=reset value="重新修改"> </form>
修改前的信息: <% String no,name,witer,xilie,pice; Connection con; Statement sql; ResultSet rs; try{ rName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch(ClassNotFoundException e) {} try{ con= tConnection(" :book"); sql= eateStatement(); rs=sql.executeQuery("select * from book"); int("<table border>"); int("<tr>"); int("<th width=100>"+"书号"); int("<th width=100>"+"书名"); int("<th width=100>"+"作者"); int("<th width=100>"+"系列"); int("<th width=100>"+"价格"); int("</tr>"); while( xt()) { int("<tr>"); int("<td>"+ tString("no")+"</td>"); int("<td>"+ tString("name")+"</td>"); int("<td>"+ tString("witer")+"</td>"); int("<td>"+ tString("xilie")+"</td>"); int("<td>"+ tString("pice")+"</td>"); int("</tr>"); } int("</table>"); ose(); } catch(SQLException e1) {} %> </html> 页面能浏览,但不能显示数据,无法修改数据库 大家帮帮忙,11号要交的作业
建议你在最后吧 catch(SQLException e1) { int();}打印一下 看是什么的异常 才好帮你解决 欢迎来 我们的java世界 针对层次不同量身学习java技术
答:// ******* 数据库连接代码 开始 ***** //异常处理语句 try { //以下几项请自行修改 String spath = "data/ b"...详情>>
答:google "java 缓冲池"详情>>
答:百度里搜张孝祥 非常好的视频教程详情>>