Vorlesungen
  Download     DBS     Sprachen     Oberflächen     File Formats     Impressum     Datenschutz  
1. Sem
2. Sem
3. Sem
4. Sem
Android
Mobile Applikationen und Infrastrukturen
5. Sem
Wahlpflicht-SoSe
Wahlpflicht-WiSe
Projektwochen
Allgemein:
Startseite
Vorlesungen
Labore
Sinnvolle Programme
Lineare Regression
GUI-Entwurfsarbeit
Single-Format
Design Pattern-Termine
Observer1
Bsp2
Json-Array
Json-Dialogelemente
Webtechnologien

Database

DBSOpenHandler


import android.content.Context;
import android.database.sqlite.*;

class DBSOpenHandler extends SQLiteOpenHelper {

    private static final String TAG = MainActivity.class.getSimpleName();

    // name and version of the database
    private static final String DATABASE_NAME = "database1.db";
    private static final int DATABASE_VERSION = 1;


    DBSOpenHandler (Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }


    @Override
    public void onCreate(SQLiteDatabase db) {

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }


}  // DBSOpenHandler


DBSOpenHandler


DBSQueries





public class DBSQueries  {

    
    private static final String TAG = MainActivity.class.getSimpleName();


    private static String getCreateTables() {
      return 
        " CREATE TABLE Table1 ("+
        " PINDEX  INTEGER  AUTOINCREMENT   NOT NULL,"+
        " VALUE1  INTEGER  DEFAULT 0,"+
        " VALUE2  VARCHAR(30)  DEFAULT '',"+
        "   CONSTRAINT Table1  PRIMARY KEY (PINDEX)"+
      " );"+
       "";
    } // getCreateTables" 


    public static int insertSQL() {
      return 0;
    }

    public static void updateSQL() {
    }
    public static void deleteSQL() {
    }

}  // DBSQueries



Current date
decimalformat