getting index out of range exception could where the problem in the code is

青春壹個敷衍的年華 提交于 2020-01-17 07:59:05

问题


dbReader = DAL.GetCaseSumCasesAssnCtrlMgmtCtrlChargeCodesLeftJoin(ClientKey, txtCaseNumber.Text)
If dbReader.Read Then
Try
  txtmgm.Text = dbReader.Item("MgmtCtrlpKey")
  HoldMGMKey = dbReader.Item("AssnCtrlpKey")
Catch ex As Exception
End Try

the exception is thrown at "AssnCtrlpkey"


回答1:


It seems to me that your dbReader doesn't have the column you're requesting ("AssnCtrlpKey"). Check your database query for that column.

Your question is sufficiently vague, however, that it's a shot in the dark.



来源:https://stackoverflow.com/questions/3619608/getting-index-out-of-range-exception-could-where-the-problem-in-the-code-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!