Foxtable(狐表)用户栏目专家坐堂 → 应为语句结束,错在哪里呢?


  共有5620人关注过本帖树形打印复制链接

主题:应为语句结束,错在哪里呢?

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


加好友 发短信
等级:二尾狐 帖子:597 积分:4974 威望:0 精华:0 注册:2012/12/27 12:34:00
应为语句结束,错在哪里呢?  发帖心情 Post By:2014/11/28 12:07:00 [只看该作者]

甜老师,我下面的代码错在哪里?
无法保存,提示应为语句结束。把Dim dr As DataRow 下面的2行注释掉后又存在:从字符串“供方确认到货日期”到类型“Integer”的转换无效。这个错误。

Dim Cols1() As String = {"Identify","供方确认到货日期"}
Dim Cols2() As String = {"_Identify","orderSupDhTime"}
For Each dr1 As DataRow In DataTables("供方到货日期确认窗口_Table1").Select("供方确认到货日期 Is not null")
    Dim nr As Date = dr1(Cols1("供方确认到货日期"))
    Dim xh As Integer = dr1("Identify") 
    Dim dr As DataRow
    dr = DataTables("orderList").Find("[_Identify] = '" & xh & "'")
    dr("orderSupDhTime") = nr
    DataTables("orderList").Find("[_Identify] = '" & xh & "'")Cols(orderSupDhTime) = nr
Next

谢谢!
[此贴子已经被作者于2014-11-28 12:56:04编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/28 14:04:00 [只看该作者]

Dim Cols1() As String = {"Identify","供方确认到货日期"}
Dim Cols2() As String = {"_Identify","orderSupDhTime"}
For Each dr1 As DataRow In DataTables("供方到货日期确认窗口_Table1").Select("供方确认到货日期 Is not null")
    Dim nr As Date = dr1(Cols1("供方确认到货日期"))
    Dim xh As Integer = dr1("Identify")
    Dim dr As DataRow
    dr = DataTables("orderList").Find("[_Identify] = '" & xh & "'")
    If dr IsNot Nothing Then
        dr("orderSupDhTime") = nr
    End If
Next

 回到顶部
帅哥哟,离线,有人找我吗?
affixed
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:二尾狐 帖子:597 积分:4974 威望:0 精华:0 注册:2012/12/27 12:34:00
  发帖心情 Post By:2014/11/28 17:17:00 [只看该作者]

甜老师,运行还是错误。
.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2014.10.23.1
错误所在事件:窗口,供方到货日期确认窗口,Button2,Click
详细错误信息:
从字符串“供方确认到货日期”到类型“Integer”的转换无效。
输入字符串的格式不正确。
[此贴子已经被作者于2014-11-28 17:21:34编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/28 17:24:00 [只看该作者]

For Each dr1 As DataRow In DataTables("供方到货日期确认窗口_Table1").Select("供方确认到货日期 Is not null")
    Dim xh As Integer = dr1("Identify")
    Dim dr As DataRow
    dr = DataTables("orderList").Find("[_Identify] = '" & xh & "'")
    If dr IsNot Nothing Then 
        Dim nr As Date = dr1("供方确认到货日期")
        dr("orderSupDhTime") = nr
    End If
Next


 回到顶部
帅哥哟,离线,有人找我吗?
affixed
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:二尾狐 帖子:597 积分:4974 威望:0 精华:0 注册:2012/12/27 12:34:00
  发帖心情 Post By:2014/11/28 17:36:00 [只看该作者]

爱死甜老师了,问题已搞定。谢谢!

 回到顶部