Foxtable(狐表)用户栏目专家坐堂 → [求助]index was outside the bounds of the array .


  共有6199人关注过本帖树形打印复制链接

主题:[求助]index was outside the bounds of the array .

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


加好友 发短信
等级:超级版主 帖子:109489 积分:557107 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/9/3 16:06:00 [显示全部帖子]

错误所在事件:项目,Server】这个是指openqq的服务端事件有问题

Index was outside the bounds of the array】指索引超界,应该是用到集合等地方有问题

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109489 积分:557107 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/9/18 20:15:00 [显示全部帖子]

服务端代码 
Dim msg As String = e.Message
If msg.StartsWith("GetBH@_")  Then
    Dim Bname As String = msg.Split("_")(1)
    cmd.CommandText = "Sel ect * From {BDLB} Where [Name] = '" & Bname & "'"
    Dim dt as datatable  = cmd.ExecuteReader
    If dt.datarows.Count > 0 Then
dim dr as datarow = dt.datarows(0)
        Dim Smx As Long = dr("StrMax") + 1
        e.ReturnValue = dr("ParNo") & format(smx, dr("StrLong"))
        cmd.CommandText = "U PDATE {BDLB} SET strmax = " & smx & " WHERE Itid = " & dr("itid")
        cmd.ExecuteNonQuery()
    End If
End If

另外服务端UserLogging代码发上来看看

 回到顶部