首页 > 其他 > 详细

​iIIegalArgumentException:the bind value at index 1 isnull

时间:2015-01-18 08:12:22      阅读:530      评论:0      收藏:0      [点我收藏+]

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 的第二列数据有误,后来才明白是这里绑定的第一个数据有问题。


​iIIegalArgumentException:the bind value at index 1 isnull

原文:http://jinchao.blog.51cto.com/9651275/1605227

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!