以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 提示错误 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=135605) |
-- 作者:做自己 -- 发布时间:2019/5/30 6:12:00 -- 提示错误 提示这样的问题,无法在 System.Int32 和 System.String 上执行“=”操作。 代码如下 Dim Cols1() As String = {"型号","尺码1","尺码2","尺码3","尺码4","尺码5","尺码6","尺码7","尺码8","尺码9","尺码10","尺码11","尺码12"} Dim Cols2() As String = {"型号","尺码1","尺码2","尺码3","尺码4","尺码5","尺码6","尺码7","尺码8","尺码9","尺码10","尺码11","尺码12"} For Each dr1 As DataRow In DataTables("西服尺码表").Select("", "_Sortkey") Dim ro2 As Row = Tables("导航1子导航2_Table5").AddNew() ro2("订单号") = ro("订单号") ro2("项次") = ro("项次") For i As Integer = 0 To Cols1.Length -1 ro2 (Cols2(i)) = dr1(Cols1(i)) Next ro2.Save Next 我的代码是这样的,两个表中,型号是字符,尺码是数字,这个有什么问题吗?为何会提示这样的问题 |
-- 作者:y2287958 -- 发布时间:2019/5/30 8:00:00 -- ro2("订单号") = ro("订单号") ro2("项次") = ro("项次") ro来自哪里?其他看不出什么问题,最好上实例
|
-- 作者:有点甜 -- 发布时间:2019/5/30 9:33:00 -- 报错和你贴出的代码没有任何关系。
你看看是不是datacolchanged等事件有错导致的。 |