本文介绍了在sql上保存两个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!try{ if (txtDesc1.Text == "") { } else { con1 = new SqlDbConnect(); strSQL = "insert into sample (id, description, dosage, qty, selling, amount)"; strSQL += "select '" + labelTransID.Text.Replace("'", "''") + "'"; strSQL += ", '" + txtDesc1.Text.Replace("'", "''") + "'"; strSQL += ", '" + txtDosage1.Text.Replace("'", "''") + "'"; strSQL += ", '" + txtQty1.Text.Replace("'", "''") + "'"; strSQL += ", '" + txtSelling1.Text.Replace("'", "''") + "'"; strSQL += ", '" + txtAmount1.Text.Replace("'", "''") + "'"; con1.SqlQuery(strSQL); con1.NonQueryEx(); con1.Close(); } 这是我的btnSave_click代码 i有一张桌子StockBin 描述nvchar50 剂量nvchar50 加上int 减去int stockleft int 我的问题是当我点击将其保存到数据库时 txtQty1也会更新到我的stockbin表格为减号 提前致谢this is my btnSave_click codei had a table StockBindescription nvchar50dosage nvchar50plus intminus intstockleft intMy question is when i am clicking to save this to databasetxtQty1 will also update to my stockbin table as minusThanks in advance推荐答案 这篇关于在sql上保存两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-12 16:59