改成
Dim dr As DataRowdr = DataTables("users表").Find("Name = '" & UserName & "'") If dr IsNot Nothing AndAlso dr("password") = password Then Verified = TrueEnd If