
SQL
xfh001
这个作者很懒,什么都没留下…
展开
-
分批加载用limit查询出所有数据
在代码中用limit作分页查询接口,有两个参数 startIndex,count ;如果想用此接口直接查询出所有数据,可以第一个参数传0,第二个参数传个负值就可以了。原创 2013-12-03 16:46:11 · 3484 阅读 · 1 评论 -
Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before
在做项目时碰到一个问题,就是一直报 java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.at android.database.Cur原创 2013-12-11 09:16:40 · 8160 阅读 · 0 评论 -
android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or da
Cursor cursor=null; Cursor cursor2=null; db = helper.getReadableDatabase(); try{ cursor=rawQuery("...",null); while (cursor.moveToNext()) { // ... cursor2=db.rawQuery("s原创 2014-01-08 11:52:58 · 1520 阅读 · 0 评论 -
数据库中插入不进数据现象
当数据库中有字段不为空时,如果在插入一条数据时,此字段的值为空,那么会插不进数据库,相当于没有调用插入方法,但程序不会报错。原创 2014-01-15 19:03:36 · 4738 阅读 · 0 评论 -
android SQLite InsertOrUpdate的使用
android SQLite InsertOrUpdate的使用转载 2015-03-27 18:00:50 · 1042 阅读 · 0 评论 -
Sqlite插入或更新
Sqlite插入或更新转载 2015-03-27 18:02:43 · 573 阅读 · 0 评论 -
在Sqlite中通过Replace来实现插入和更新
在Sqlite中通过Replace来实现插入和更新转载 2015-03-27 17:54:37 · 638 阅读 · 0 评论