private void writeDatabaseLocation() { //Udate the current location from GPS services to database for future use (eg on no GPS fix) SQLQuery = "UPDATE locations SET country = 'Current Location', town = 'Current Location', latitude = '" + currentLat + "', longitude = '" + currentLong + "' WHERE rowid = 1"; objDb = new DatabaseManager(); objDb.runQuery(SQLQuery); }
private void writeDatabaseLocation(int xPosition) { //Send SQLite query to write to database //Construct query to insert new entry into database //Entry values from returned GeoCoder location in position of which item clicked in the list SQLQuery = "INSERT INTO locations (country, town, latitude, longitude) VALUES ('" + locationsList[xPosition].country + "','" + locationsList[xPosition].town + "','" + locationsList[xPosition].latitude + "','" + locationsList[xPosition].longitude + "')"; //Send query to database manager objDb = new DatabaseManager(); objDb.runQuery(SQLQuery); }