以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 语法错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=107960) |
-- 作者:jygyyl -- 发布时间:2017/10/13 11:30:00 -- 语法错误 If e.DataCol.Name = "GB011" Then Dim cmd As New SQLCommand Dim dt As DataTable Dim dr As DataRow = e.DataRow cmd.C cmd.CommandText = "SELECT * Fro m {NCJYHxx} Where [GB011] = \'" & dr("GB011") & "\' OrElse Where [GB026] = \'" & dr("GB011") & "\' " dt = cmd.ExecuteReader If dt.DataRows.Count > 0 Then dr("GS184") = dt.DataRows(0)("GS184") dr("GS183") = dt.DataRows(0)("GS183") dr("账户") = dt.DataRows(0)("HGB015") dr("账号") = dt.DataRows(0)("HGB003") \'dr("GS914") = dt.DataRows(0)("GS914") \'dr("GB022") = dt.DataRows(0)("GB022") \'dr("GB023") = dt.DataRows(0)("GB023") Else \'否则清除下面列的内容 e.DataRow("GS184") = Nothing End If End If 提示OrElse附近语法错误,求专家指点
|
-- 作者:有点甜 -- 发布时间:2017/10/13 11:35:00 --
cmd.CommandText = "SELECT * From {NCJYHxx} Where [GB011] = \'" & dr("GB011") & "\' Or [GB026] = \'" & dr("GB011") & "\'"
[此贴子已经被作者于2017/10/13 11:35:48编辑过]
|
-- 作者:jygyyl -- 发布时间:2017/10/13 12:10:00 -- 回复:(有点甜) cmd.CommandText = "SELECT ... 谢谢您 |