iIIegalArgumentException:the bind value at index 1 isnull
iIIegalArgumentException:the bind value at index 1 isnull
這個(gè)java.lang.IIIegalArgumentException的解釋如下:
public classIllegalArgumentExceptionextends RuntimeException拋出的異 常表明向方法傳遞了一個(gè)不合法或不正確的參數(shù)
?
找到這個(gè)問題對(duì)應(yīng)的出現(xiàn)錯(cuò)的行:
[java]?viewplaincopy
Cursor?c?=?db.rawQuery("select?*?from?tablename?where?cntrct_no=??AND?product_code=?",??
????????????????new?String[]{cntrct_no,?product_code});??
????????????while?(c.moveToNext())?{?}??
這里我是想調(diào)用數(shù)據(jù)庫(kù) ,取得查詢結(jié)果,問題追蹤了一下,我傳值的cntrct_no是null,他提示的?the bind value at index is null 我一直認(rèn)為下面while里面獲取數(shù)據(jù)的時(shí)候的index 的第二列數(shù)據(jù)有誤,后來才明白是這里綁定的第一個(gè)數(shù)據(jù)有問題。
轉(zhuǎn)載于:https://blog.51cto.com/jinchao/1605227
總結(jié)
以上是生活随笔為你收集整理的iIIegalArgumentException:the bind value at index 1 isnull的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自己怎么买生育保险
- 下一篇: rfhx文件怎么打开