try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:jspdate","","");
int id=Integer.parseInt(request.getParameter("id"));
String sql="delete from INFO_table where id='"+id+"'";
System.out.println("id="+id);
Statement stmt=conn.createStatement();
stmt.executeUpdate(sql);
System.out.println("333333");
stmt.close();
conn.close();
}
catch (Exception err) {}
其中id=42
Statement stmt=conn.createStatement();没有执行
在线等高手帮忙解决,现场给分
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:jspdate","","");
int id=Integer.parseInt(request.getParameter("id"));
String sql="delete from INFO_table where id='"+id+"'";
System.out.println("id="+id);
Statement stmt=conn.createStatement();
stmt.executeUpdate(sql);
System.out.println("333333");
stmt.close();
conn.close();
}
catch (Exception err) {}
其中id=42
Statement stmt=conn.createStatement();没有执行
在线等高手帮忙解决,现场给分
System.out.println(sql);what out?
没错啊。我都要哭了。天为什么要这样罚我?让我如此无力
还有啊你是想删除表里所有的记录吗/?
下面这个打印的是什么/?打印错了吧/?
'"还有一个错误报告是:Ljava.lang.StackTraceElement;@b28980'"
想把等于id的删除