iIIegalArgumentException:the bind value at index 1 isnull

这个java.lang.IIIegalArgumentException的解释如下:

public classIllegalArgumentExceptionextends RuntimeException抛出的异 常表明向方法传递了一个不合法或不正确的参数

 

找到这个问题对应的出现错的行:

[java] viewplaincopy

  1. Cursor c = db.rawQuery("select * from tablename where cntrct_no=? AND product_code=?",  

  2.                 new String[]{cntrct_no, product_code});  

  3.             while (c.moveToNext()) { }  



这里我是想调用数据库 ,取得查询结果,问题追踪了一下,我传值的cntrct_nonull,他提示的 the bind value at index is null 我一直认为下面while里面获取数据的时候的index 的第二列数据有误,后来才明白是这里绑定的第一个数据有问题。