Android SqliteDatabase Command insertTour(SQLiteDatabase db, String tourName)

Here you can find the source of insertTour(SQLiteDatabase db, String tourName)

Description

insert Tour

Declaration

public static long insertTour(SQLiteDatabase db, String tourName) 

Method Source Code

//package com.java2s;

import android.content.ContentValues;

import android.database.sqlite.SQLiteDatabase;

public class Main {
    protected final static String TOUR_TABLE_NAME = "Tour";
    protected final static String TOUR_NAME = "name";

    public static long insertTour(SQLiteDatabase db, String tourName) {
        ContentValues values = new ContentValues();
        values.put(TOUR_NAME, tourName);
        long id = db.insert(TOUR_TABLE_NAME, null, values);
        return id;
    }//from www. ja v  a  2 s . co  m
}

Related

  1. getTaskCursor(SQLiteDatabase database, String name)
  2. SQLiteSanitize(String input)
  3. getFreeTourName(SQLiteDatabase db, String tourName)
  4. getNewTourPointPosition(SQLiteDatabase db, long tourId)
  5. getTourNames(SQLiteDatabase db)
  6. isCompanyInTour(SQLiteDatabase db, long companyId, long tourId)
  7. tourNameExists(SQLiteDatabase db, String tourName)
  8. getColumns(SQLiteDatabase db, String tableName)
  9. dropAllViews(SQLiteDatabase sqlitedatabase)