商品管理案例.docVIP

  • 11
  • 0
  • 约1.33万字
  • 约 11页
  • 2018-05-26 发布于湖北
  • 举报
商品管理案例 一:增加数据 1:Dao代码部分 // 增加商品 public boolean insert(String goodName, int num, float price) { boolean flage = true; //定义要执行的sql语句 String sql = insert into T_goods values(?,?,?); //获得数据库连接 Connection connection = DBManager.getConnection(); try { //定义用于发送sql语句到数据库执行的对象PreparedStatement PreparedStatement pst = connection.prepareStatement(sql); /// 增加商品 public boolean insert(String goodName, int num, float price) { boolean flage = true; //定义要执行的sql语句 String sql = insert into T_goods values(?,?,?); //获得数据库连接 Connection connection = DBManager.getConnection(); tr

文档评论(0)

1亿VIP精品文档

相关文档