爱问知识人 爱问教育 医院库

高手帮我看看jsp与access数据库连接问题

首页

高手帮我看看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号要交的作业

提交回答
好评回答
  • 2008-07-10 08:59:53
    建议你在最后吧
    catch(SQLException e1) {  int();}打印一下 看是什么的异常 才好帮你解决
    欢迎来
    我们的java世界 针对层次不同量身学习java技术
     
    

    o***

    2008-07-10 08:59:53

类似问题

换一换

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 177-196
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):