Foxtable(狐表)用户栏目专家坐堂 → 无法在 System.Int32 和 System.String 上执行“=”操作


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

主题:无法在 System.Int32 和 System.String 上执行“=”操作

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


加好友 发短信
等级:幼狐 帖子:154 积分:1295 威望:0 精华:0 注册:2017/8/11 16:01:00
无法在 System.Int32 和 System.String 上执行“=”操作  发帖心情 Post By:2019/11/26 13:53:00 [只看该作者]

出现以下提示:

.NET Framework 版本:4.0.30319.17929
Foxtable 版本:2019.8.19.1
错误所在事件:表,图纸主表,DataColChanging
详细错误信息:
调用的目标发生了异常。
无法在 System.Int32 和 System.String 上执行“=”操作。

 

以下代码,在DataColChanging

If e.DataCol.Name = "序号" Then
    Dim dr As DataRow
    dr = e.DataTable.Find("序号 = '" & e.NewValue & "'")
    If dr IsNot Nothing Then
        MessageBox.Show("此序号已经存在!")
        e.Cancel = True
    End If
End If


 回到顶部