java.lang.IllegalArgumentException: the bind value at index 1 is null
来源:互联网 发布:淘宝美即面膜怎么样 编辑:程序博客网 时间:2024/06/05 16:30
今天在用SQLiteDatabase检查表中是否存在某个字段的时候遇到这个错误
Cursor cursor = db.rawQuery(existSql, new String[]{useraccount});
java.lang.IllegalArgumentException: the bind value at index 1 is null 意思是要搜索的字段为空, 一个是我太不小心了(-.=|||竟然绑定错控件),第二个是方法调错了(囧)
在用SQLiteDatabase查询有两种方法:
1.
Cursor cursor = db.query(TABLE_NAME, null,"account=?", new String[]{useraccount}, null, null, null);while(cursor.moveToFirst)
2.
String existSql = "select * from "+TABLE_NAME+" where account=?";Cursor cursor = db.rawQuery(existSql, new String[]{useraccount});while(cursor.moveToFirst)
因为这次粗心大意..浪费了半天 -_-|||必须记录下来以此为鉴.
- java.lang.IllegalArgumentException: the bind value at index 1 is null or java.lang.IllegalArgumen
- java.lang.IllegalArgumentException: the bind value at index 1 is null
- Caused by: java.lang.IllegalArgumentException: the bind value at index 1 is null
- Caused by: java.lang.IllegalArgumentException: the bind value at index 1 is null
- Caused by: java.lang.IllegalArgumentException: the bind value at index 1 is null
- java.lang.IllegalArgumentException: the bind value at index 1 is null
- 问题:java.lang.IllegalArgumentException:the bind value at index is null
- 问题:java.lang.IllegalArgumentException:the bind value at index is null
- java.lang.IllegalArgumentException: The observer is null.
- java.lang.IllegalArgumentException: The observer is null.
- java.lang.IllegalArgumentException: The observer is null.异常解决方案
- android java.lang.IllegalArgumentException: The observer is null 异常解决
- java.lang.IllegalArgumentException: The observer is null.最终解决方案
- 安卓java.lang.IllegalArgumentException: The observer is null.解决方案
- java.lang.IllegalArgumentException: The observer is null.异常解决
- 解决方案:java.lang.IllegalArgumentException: The observer is null
- viewpager java.lang.IllegalArgumentException:The observer is null
- java.lang.IllegalArgumentException: host parameter is null
- 使用dojo下Menu和PopupMenuItem实现动态菜单
- Windows Phone开发(6):处理屏幕方向的改变
- 我的vim配置[ ctags + cscope + omni == 多图、强大、详解 ]
- Android内容观察者--ContentObserver
- 生活在ring3和ring0的Native API
- java.lang.IllegalArgumentException: the bind value at index 1 is null
- IT资源分类大全
- Android很有用的代码片段
- android用ksoap2调用.net的webservice传参数,服务器接收为空的情况
- 如何查找在Android中查找特定进程?
- open fetion和hybrid
- C++实现爱拉托斯散筛法寻找素数
- Android开发的技术层次
- C#之DataSet类