Android - SQLite Cursor getColumnIndex() is case sensitive?

后端 未结 4 2009
孤街浪徒
孤街浪徒 2020-12-06 06:29

While working with SQLiteCursor in Android i came to know that the getColumnIndex() is behaving case sensitive for example:

Example:

4条回答
  •  無奈伤痛
    2020-12-06 07:05

    getColumnIndex() is case sensitive:

    Column Name in DB was: Rules

    cursor.getColumnIndex("Rules") //workes fine

    cursor.getColumnIndex("rules") //throws error, see the error detail

提交回复
热议问题