本帖最后由 feizeikesi 于 2012-2-2 21:40 编辑
value(:字段)中的冒号是啥意思。。或者这么写的作用是
private Boolean SaveBaseInfo()
{
OracleDB db = new OracleDB();
string cmd = "SELECT * FROM LFSMELTBASEINFO WHERE JLCLH = '" + baseInfo.CLH + "'";
DBTable dt = db.Select(cmd);
int num = dt.RowCount;
if (num == 0)
{
cmd = "INSERT INTO LFSMELTBASEINFO (" +
"JLCLH, LH, CLH, GZ, BZLX," +
"ZH, GBH, GBCS, LGCS, BC, BZ, " +
"DZGSZL, DZSJ, CZSJ, YLKSSJ, YLJSSJ," +
"CGGSZL, DHL, CYL, CDL, TDSJ, YLSJ, " +
"CYSJ, DZWD, CZWD, CGYH, YLTJ, SYJH, " +
"JSTJ, QTGD, APP, GENO,GKNO,"+
"OPERATOR,YINGSHI,DIANSHI,FANTU,SHIHUI,"+
"MAIHUZHA_CODE,WEIGHT_MAIHUZHA,BAOWENJI_CODE,WEIGHT_BOWENJI,CEWENTOU,"+
"OUTOU,QUYANGQI,POWER_A,POWER_B,POWER_C,"+
"LUGAI_YALI,LUGAI_LIULIANG,OXYGEN_VALUE_FOR_ARRIVAL,ZHAHOU,XLOOP,"+
"AY1, AY2) VALUES(" +
":JLCLH, :LH, :CLH, :GZ, :BZLX," +
":ZH, :GBH, :GBCS, :LGCS, :BC, :BZ," +
":DZGSZL, :DZSJ, :CZSJ, :YLKSSJ, :YLJSSJ," +
":CGGSZL, :DHL, :CYL, :CDL, :TDSJ, :YLSJ," +
":CYSJ, :DZWD, :CZWD, :CGYH, :YLTJ, :SYJH," +
":JSTJ, :QTGD, :APP, :GENO,:GKNO," +
":OPERATOR,:YINGSHI,:DIANSHI,:FANTU,:SHIHUI," +
":MAIHUZHA_CODE,:WEIGHT_MAIHUZHA,:BAOWENJI_CODE,:WEIGHT_BOWENJI,:CEWENTOU," +
":OUTOU,:QUYANGQI,:POWER_A,:POWER_B,:POWER_C," +
":LUGAI_YALI,:LUGAI_LIULIANG,:OXYGEN_VALUE_FOR_ARRIVAL,:ZHAHOU,:XLOOP," +
":AY1, :AY2)";
} |
|