How to retrieve data from SQLite table in Android -
i doing map application in android using sqlite store , retrieve data. create table store latitude , longtitude not know how retrieve latitude , longtitude values sqlite bind them latitude , longtitude values in map activity.
can me?
use start:
sqlitedatabase db = openorcreatedatabase("my_locations.db", sqlitedatabase.create_if_necessary, null); string[] columns = new string[]{"latitude", "longitude"}; string[] name = new string[]{"dientringh"}; cursor c = db.query("location", columns, "name=?", name, null, null, null); string latitude = c.getstring(0); string longitude = c.getstring(1);
Comments
Post a Comment