第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

JSP寫好的代碼并沒有顯示錯誤,但是運行時出錯了,并且提示的地方并沒有問題

JSP寫好的代碼并沒有顯示錯誤,但是運行時出錯了,并且提示的地方并沒有問題

<%--?? ? Document ? : Updatemysql? ? Created on : 2016-6-4, 10:01:31? ? Author ? ? : zhanghuiqing--%><%@page import="java.sql.ResultSet"%><%@page import="java.sql.Statement"%><%@page import="java.sql.Connection"%><%@page import="java.sql.DriverManager"%><%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE html><html>? ? <head>? ? ? ? <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">? ? ? ? <title>JSP Page</title>? ? </head>? ? <body>? ? ? ? <%!? ? ? ? ? ?Connection con;? ? ? ? ? ?Statement st;? ? ? ? ? ?ResultSet rs;? ? ? ? %>? ? ? ? <%? ? ? ? ? try{? ? ? ? ? ? Class.forName("com.mysql.jdbc.Driver");? ? ? ? ? ? Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/mytest","root","");? ? ? ? ? ? Statement st=con.createStatement();? ? ? ? ? ? ResultSet rs=st.executeQuery("select * from course");? ? ? ? ? }? ? ? ? ? catch(Exception e){? ? ? ? ? ? ? e.printStackTrace();? ? ? ? ? }? ? ? ? ? ??? ? ? ? %>? ? ? ? <br>? ? ? ? <table border="1" bordercolor="#FF0000" bgcolor="#EFEFEF" width="400">? ? ? ? ? ? <tr bgcolor="CCCCCC" align="center">? ? ? ? ? ? ? ? <td>課程號</td>? ? ? ? ? ? ? ? <td>課程名</td>? ? ? ? ? ? ? ? <td>教師號</td>? ? ? ? ? ? </tr>? ? ? ? ? ? <tr align="center">? ? ? ? ? ? ? ? <td><%=rs.getInt("cno")%></td>? ? ? ? ? ? ? ? <td><%=rs.getString("cname")%></td>? ? ? ? ? ? ? ? <td><%=rs.getInt("tno")%></td>? ? ? ? ? ? </tr>? ? ? ? </table>? ? ? ? ? ? <%? ? ? ? ? ? ? ?try{? ? ? ? ? ? ? ? ? ?int count=st.executeUpdate("Update course set cname='Servlet' where cno='1017'");? ? ? ? ? ? ? ? ? ?if(count!=0){? ? ? ? ? ? ? ? ? ? ? ?System.out.print("影響行數(shù)"+count);? ? ? ? ? ? ? ? ? ? ? ?rs=st.executeQuery("select * from course");? ? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ?catch(Exception e){? ? ? ? ? ? ? ? ? ?e.printStackTrace();? ? ? ? ? ? ? ?}? ? ? ? ? ? %>? ? ? ? ? ? <br>? ? ? ? ? ? 更新后的記錄? ? ? ? ? ? <br>? ? ? ? ? ? <table border="1" bordercolor="#FF0000" bgcolor="#EFEFEF" width="400">? ? ? ? ? ? <tr bgcolor="CCCCCC" align="center">? ? ? ? ? ? ? ? <td>課程號</td>? ? ? ? ? ? ? ? <td>課程名</td>? ? ? ? ? ? ? ? <td>教師號</td>? ? ? ? ? ? </tr>? ? ? ? ? ? <%rs.first();%>? ? ? ? ? ? <tr align="center">? ? ? ? ? ? ? ? <td><%=rs.getInt("cno")%></td>? ? ? ? ? ? ? ? <td><%=rs.getString("cname")%></td>? ? ? ? ? ? ? ? <td><%=rs.getInt("tno")%></td>? ? ? ? ? ? </tr>? ? ? ? ? ? </table>? ? ? ? ? ? <%? ? ? ? ? ? ? ?rs.close();? ? ? ? ? ? ? ?st.close();? ? ? ? ? ? ? ?con.close();? ? ? ? ? ? %>? ? </body></html>
查看完整描述

1 回答

?
_瀟瀟暮雨

TA貢獻646條經(jīng)驗 獲得超225個贊

報什么錯啊?

查看完整回答
反對 回復(fù) 2016-06-04
  • 1 回答
  • 0 關(guān)注
  • 1836 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號