以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 请高手帮忙解决一下,问题出现在哪里?谢谢 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=47515) |
-- 作者:thliucs -- 发布时间:2014/3/11 19:44:00 -- 请高手帮忙解决一下,问题出现在哪里?谢谢 Select Case e.DataCol.Name Case "编号" If e.DataRow.Isnull("编号") Then e.DataRow("乡镇名称") = Nothing e.DataRow("村名称") = Nothing Else If e.DataRow.IsNull("编号") = False AndAlso e.DataRow("编号").length >=6 Then Dim bm As String = e.DataRow("编号").Substring(0,4) Dim dr As String = DataTables("所在地").Find("镇村编码 = \'" & bm & "\'") If dr IsNot Nothing Then e.DataRow("乡镇名称") = dr("乡镇名称") e.DataRow("村名称") = dr("村名称") End If End If End Select
错误提示:编译错误:类型“DataRow”的值无法转为“String” 错误代码:Dim dr As String = DataTables("所在地").Find("镇村编码 = \'" & bm & "\'") |
-- 作者:逛逛 -- 发布时间:2014/3/11 19:51:00 -- Dim dr As DataRow = DataTables("所在地").Find("镇村编码 = \'" & bm & "\'") |
-- 作者:thliucs -- 发布时间:2014/3/11 19:54:00 -- 谢谢!
|