public boolean executeSql(String sql)
{
try{
Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection(strur1,"root","");
Statement stmt=conn.createStatement();
stmt.executeUpdate(sql);
System.out.println("executeSql-------"+sql);
// conn.commit();
return true;
}catch(Exception e)
{
System.out.println("executeSql-------"+e.toString());
return false;
}
}
评论0
最新资源