JDBC的jar包//System.out.println("sql语句是:"+sql);inti=0;//数据库连接DBConnectiondb=newDBConnection();try{PreparedStatementpreStmt=(PreparedStatement)db.conn.prepareStatement(sql);preStmt.executeUpdate();preStmt.close();db.close();//关闭连接i=1;//System.out.println("数据插入成功,sql语句是:"+sql);}catch(Exceptione){e.printStackTrace();}returni;//前往影响的行数,1为执行成功;
2016/5/19 5:34:11
847B
db
1