以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]客户端登录  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=186085)

--  作者:bzqlyj
--  发布时间:2023/4/5 16:39:00
--  [求助]客户端登录
在客户端登录,如用户表内无此用户,显示“索引超出了数组界限。
cmd.CommandText = "S0lect * From {XXX} Where [AA] = \'" & BB & "\'"
dt = cmd.ExecuteReader
dr = dt.DataRows(0)
if dr isnot nothing then

--  作者:linyunu
--  发布时间:2023/4/5 16:46:00
--  
if dt.DataRows.count > 0 then
  dr = dt.DataRows(0)
 ...

--  作者:bzqlyj
--  发布时间:2023/4/6 8:39:00
--  回复:(linyunu)if dt.DataRows.count > 0 ...
问题解决,谢谢