Bladeren bron

SQL语句补充

Hcsy 8 jaren geleden
bovenliggende
commit
1fb0942518
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -362,7 +362,7 @@ namespace UAS_MES.Make
                 sql.Append("where ma_code='" + make_code + "'and sp_id=" + sp_id + " and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode + "'");
                 sql.Append("where ma_code='" + make_code + "'and sp_id=" + sp_id + " and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode + "'");
                 dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode" }, CollectDataSonCode.ToArray(), CollectData.ToArray());
                 dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode" }, CollectDataSonCode.ToArray(), CollectData.ToArray());
                 //更新序列号半成品已被使用
                 //更新序列号半成品已被使用
-                dh.ExecuteSql("update ms_nextmacode='"+ma_code+"' where ms_id=(select max(ms_id) from makeserial where ms_sncode='"+sn_code.Text+"' and ms_makecode<>'"+ma_code+"')", "update");
+                dh.ExecuteSql("update makeserial set ms_nextmacode='" + ma_code+"' where ms_id=(select max(ms_id) from makeserial where ms_sncode='"+sn_code.Text+"' and ms_makecode<>'"+ma_code+"')", "update");
                 if (ecn_label.Checked || softwareversion_label.Checked)
                 if (ecn_label.Checked || softwareversion_label.Checked)
                 {
                 {
                     string ecnText = ecn_label.Checked ? ecn.Text : "";
                     string ecnText = ecn_label.Checked ? ecn.Text : "";