-- 作者:mamuaiqing
-- 发布时间:2013/6/29 20:52:00
-- 在表BeforeSaveDataRow事件中问题
在表BeforeSaveDataRow事件中输入下面的代码
If e.DataRow("订单编号") Then Dim cmd As New SQLCommand Dim dt As DataTable Dim dr As DataRow = e.DataRow cmd.C cmd.CommandText = "SELECT * From {生产流程表} Where [订单单号] = \'" & dr("订单编号") & "\'" dt = cmd.ExecuteReader If dt.DataRows.Count > 0 Then cmd.CommandText = "UPDATE {生产流程表} SET 结束 = True WHERE [订单单号] = \'" & dr("订单编号") & "\'And [产品编号] = \'" & dr("产品编号") & "\'" cmd.ExecuteNonQuery() End If End If
当订单编号为"201206-002"出现了图中的错误提示,
订单编号为"201206002"的话又没错误这是怎么回事? 此主题相关图片如下:图1.png
|