Get the value from the cursor in Android SQLite

I used the below code to get the “place” value from the “place” column using a cursor. The value of the place in my database is a string,but It returns a number that I have no idea what it is.

here’s my code:



I think I’ve inserted them correctly… here it is:


R.string.consert7_place is an integer, not a String.

You need to use getResources().getString(R.string.consert7_place)

For more details, see Android: How do I get string from resources using its name?

Your cursor.getString usage is fine.