当前位置: 技术问答>java相关
成功删除,但还是有异常,WHY?
来源: 互联网 发布时间:2017-04-24
本文导语: try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn=DriverManager.getConnection("jdbc:odbc:test_number","number","number"); Statement statement=conn.createStatement(); String sql="delete from user_new where new_name='f'"; ...
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:test_number","number","number");
Statement statement=conn.createStatement();
String sql="delete from user_new where new_name='f'";
ResultSet resultset=statement.executeQuery(sql);
}
catch(Exception e){
Systeml.out.println("error");
}
那位英雄给我一个答案先?
|
statement.executeUpdate(sql);