以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  我觉得这段代码没有问题,怎么会找不到需要的行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=88113)

--  作者:天蝉一线
--  发布时间:2016/7/27 11:51:00
--  我觉得这段代码没有问题,怎么会找不到需要的行
Dim dr As DataRow = DataTables("users").Find("yhbm =\'" & e.Form.Controls("useryhbm").text & "\'")
    If dr Is Nothing Then
        Messagebox.show("用户账号错误!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Form.Controls("Useryhbm").Select
    Else
        e.Form.Controls("userdwmc").value = dr("dwmc")
        e.Form.Controls("username").value = dr("name")
        e.Form.Controls("usergroup").value = dr("group")
        e.Form.Controls("PassWord").Select
    End If


--  作者:大红袍
--  发布时间:2016/7/27 12:13:00
--  
msgbox(e.Form.Controls("useryhbm").text)