ArcEngine 異常 :The index passed was not within the valid range.


pRowBuffer.set_Value(pFds.FindField("W_Mean"), Re_mean[3]);

此句代碼彈出異常:The index passed was not within the valid range. 翻譯為傳遞的索引不在有效范圍

起初以為3超出了范圍,多次修改實驗,一直彈出這個錯誤。

搜索這個異常的時候,官網的資料是 Geocoding a table with blank values in the adress field genetates the error message;

自己翻譯了一下,以為是Re_mean[3]的值的問題,所以將值改為其他,結果還是這個錯誤。

懷疑是FindFiled時沒有找到這個name,將name多次對比,發現一樣的。然后輸出找到的索引,也是正常的。

折騰了一晚上,發現原來是創建Row的時候用的是另一張表!!!!

 

尼瑪,大腦一時短路,折騰了一晚上!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM