以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- SQL Command使用 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=151813) |
-- 作者:kaituozhe -- 发布时间:2020/7/4 7:26:00 -- SQL Command使用 Select Case e.DataCol.name Case "选择" If e.DataRow("选择") = True Then Dim cmd As New SQLCo mmand cmd.Connecti cmd.Comma ndText ="Sel ect Count(*) Fr om {Users} Wh ere 用户 = \'" & _User Name & "\'and 公司名称 = \'" & uuuuuu & "\'and 一级菜单 = \'" & e.DataRow("一级菜单") & "\'and 二级菜单 = \'" & e.DataRow("二级菜单") & "\'and 三级菜单 = \'" & e.DataRow("三级菜单") & "\'and 四级菜单 = \'" & e.DataRow("四级菜单") & "\'and 五级菜单 = \'" & e.DataRow("五级菜单") & "\'and 六级菜单 = \'" & e.DataRow("六级菜单") & "\'and 七级菜单 = \'" & e.DataRow("七级菜单") & "\'and 八级菜单 = \'" & e.DataRow("八级菜单") & "\' " If cmd.Execut eScalar <= 0 Then \'Ins ert Into 项目菜单 (一级菜单,二级菜单,三级菜单,四级菜单,五级菜单,六级菜单,七级菜单,八级菜单,用户,公司名称) Values(e.DataRow("一级菜单") ,e.DataRow("二级菜单"),e.DataRow("三级菜单"),e.DataRow("四级菜单"),e.DataRow("五级菜单"),e.DataRow("六级菜单"),e.DataRow("七级菜单"),e.DataRow("八级菜单"),_UserN ame,uuuuuu) End If Else End If End Sel ect |
-- 作者:kaituozhe -- 发布时间:2020/7/4 7:26:00 -- 上述黄色代码改怎么修改 |
-- 作者:kaituozhe -- 发布时间:2020/7/4 7:29:00 -- Select Case e.DataCol.name Case "选择" If e.DataRow("选择") = True Then Dim cmd As New SQLCo mmand cmd.Connec ti cmd.Comma ndText ="Sel ect Count(*) Fr om {Users} Wh ere 用户 = \'" & _User Name & "\'and 公司名称 = \'" & uuuuuu & "\'and 一级菜单 = \'" & e.DataRow("一级菜单") & "\'and 二级菜单 = \'" & e.DataRow("二级菜单") & "\'and 三级菜单 = \'" & e.DataRow("三级菜单") & "\'and 四级菜单 = \'" & e.DataRow("四级菜单") & "\'and 五级菜单 = \'" & e.DataRow("五级菜单") & "\'and 六级菜单 = \'" & e.DataRow("六级菜单") & "\'and 七级菜单 = \'" & e.DataRow("七级菜单") & "\'and 八级菜单 = \'" & e.DataRow("八级菜单") & "\' " If cmd.Execut eScalar <= 0 Then \'Ins ert Into 项目菜单 (一级菜单,二级菜单,三级菜单,四级菜单,五级菜单,六级菜单,七级菜单,八级菜单,用户,公司名称) Values(e.DataRow("一级菜单") ,e.DataRow("二级菜单"),e.DataRow("三级菜单"),e.DataRow("四级菜单"),e.DataRow("五级菜单"),e.DataRow("六级菜单"),e.DataRow("七级菜单"),e.DataRow("八级菜单"),_UserN ame,uuuuuu) End If Else End If End Sel ect |
-- 作者:kaituozhe -- 发布时间:2020/7/4 8:05:00 -- 找到了 |