Get boolean from database using Android and SQLite

后端 未结 10 1499
情话喂你
情话喂你 2020-12-07 09:02

How can I obtain the value of a boolean field in an SQLite database on Android?

I usually use getString(), getInt(), etc. to get the values

10条回答
  •  攒了一身酷
    2020-12-07 09:47

    There is no bool data type in SQLite. Use an int that you fix to 0 or 1 to achieve that effect. See the datatypes reference on SQLite 3.0.

提交回复
热议问题