package zuoye;

import java.sql.Connection;
import java.sql.PreparedStatement;

public class text1 {
public static void main(String[] args) {
Connection conn=null;
PreparedStatement pre =null;
try {
conn=zuoye.getConnection();
String s="update emp set ename='sdfaa' where id=1017";
pre = conn.prepareStatement(s);
int i = pre.executeUpdate(s);
if(i>0){
System.out.println("修改成功");
}else{
System.out.println("修改失败");
}
} catch (Exception e) {
e.printStackTrace();
}finally {
zuoye.a(conn,pre);
}
}
}
posted on 2019-04-02 08:31  ~王~  阅读(295)  评论(0编辑  收藏  举报