Foxtable(狐表)用户栏目专家坐堂 → 在执行代码时,有部分数据丢失


  共有2067人关注过本帖平板打印复制链接

主题:在执行代码时,有部分数据丢失

帅哥哟,离线,有人找我吗?
erdbeer
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:447 积分:4793 威望:0 精华:0 注册:2010/4/11 14:09:00
在执行代码时,有部分数据丢失  发帖心情 Post By:2019/5/3 14:25:00 [只看该作者]

       Dim Cols1() As String = {"入库日期","客户代码","客户名称","定单号码","品名","件数","数量","单价","长","宽","高","毛重","单位"}
       Dim Cols2() As String = {"入库日期","客户代码","客户名称","定单号码","品名","件数","数量","单价","长","宽","高","毛重","单位"}
       For Each dr1 As DataRow In DataTables("入库明细").Select("[选择] = true")
            Dim dr2 As DataRow = DataTables("出库明细").AddNew()
            For i As Integer = 0 To Cols1.Length -1
              dr2(Cols2(i)) = dr1(Cols1(i))
            Next
              dr2("箱号") = dr1("首箱号") & dr1("尾箱号")
              dr1.Delete()
       Next

在执行这段代码时,出库明细  表中 有部分箱号数据丢失了,为空白或是只有首箱号,并没有把dr1("首箱号") & dr1("尾箱号")合成起来,是为什么?

 回到顶部