dim sStr as string=","trydim dt as datatable =getData(1)If dt.Rows.Count > 0 Then Dim drRows() As DataRow = dt.Select("F1 like 'BCX/%' ") If drRows.Length > 0 Then Dim i As Integer For i = 0 To drRows.Length - 1 sStr += DBNULL2Str(drRows(i).Item("F1") + "," Next End IfEnd IfCatch ex As Exception log(ex) end Try以上運(yùn)行時(shí),偶爾會(huì)出現(xiàn)log “System.NullReferenceException: 未將對象引用設(shè)置到對象的實(shí)例”錯(cuò)誤 代碼竟然是這行: sStr += DBNULL2Str(drRows(i).Item("F1") + ","由于調(diào)試正常,批量客戶運(yùn)行時(shí),會(huì)這樣,無法調(diào)試。請問有什么可能?
- 2 回答
- 0 關(guān)注
- 586 瀏覽
添加回答
舉報(bào)
0/150
提交
取消