帮忙看看这个SQL语句错在哪了
Dim sql As String = "update diming set d_py= " & LCase(IndexCode( "d_name "))
其中 d_py,d_name是表 diming 的两个字段,LCase(IndexCode())【 Function IndexCode(ByVal IndexTxt As String) As String】是自己定义的一个函数,上面写法自定义的函数会把字段d_name当作一个d_name字符串来处理,大家看看这么修改啊?
------解决方案--------------------一着急,写错了,更正一下
Dim sql As String = "update diming set d_py= ' " & LCase(IndexCode(Dt.Rows[0][ "d_name "].ToString())) & " ' "