Foxtable(狐表)用户栏目专家坐堂 → [求助]sqlfind问题


  共有1778人关注过本帖平板打印复制链接

主题:[求助]sqlfind问题

帅哥哟,离线,有人找我吗?
晨曦396
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:266 积分:2472 威望:0 精华:0 注册:2019/2/15 9:43:00
[求助]sqlfind问题  发帖心情 Post By:2019/7/24 16:57:00 [只看该作者]

Dim cmc As WinForm.CheckedComboBox
Dim c As String
Dim d As String
c= e.Form.Controls("ComboBox1").text
cmc = e.Form.Controls("CheckedComboBox1")
cmc.ComboList = DataTables("用户分组").SQLGetComboListString("分组")

Dim i As Integer = 0
For Index As Integer = 0 To cmc.Items.Count - 1
    Dim dr As DataRow = DataTables("用户分组").Find("分组 = '" & cmc.Items(Index) & "' And 用户 = '" & c & "'")       
    If dr IsNot Nothing Then
        i = i+1
        If i = 1 Then
            d= dr("分组")
        Else
            d= d & "," & dr("分组")
        End If
    End If
Next

e.Form.Controls("CheckedComboBox1").text = d

以上代码中 sql不能查询到数据,但是用find就能查到,(数据已经保存到后台数据库中) 

 回到顶部