subtypedaoimpl.java~1~

来自「JSP数据库系统开发案例精选 ---电子商务系统」· JAVA~1~ 代码 · 共 26 行

JAVA~1~
26
字号
package com.wgh.dao;

import commerce.SubType;
import com.wgh.DB.connDB;
import com.wgh.DB.chStr;

public class SubtypeDaoImpl implements SubtypeDao {
  public SubtypeDaoImpl() {
  }
connDB conn=new connDB();
chStr chStr=new chStr();
public int insert(SubType spt) {
int ret=-1;
try{
  String sql = "insert into tb_subType (typename) values('" + chStr.chStr(spt.gettypename()) +
      "')";
  ret = conn.executeUpdate(sql);
}catch (Exception e){
  ret=0;
}
return ret;
}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?