samedi 19 mars 2016

android.database.sqlite.SQLiteException: near "(": syntax error (code 1) - Exception error

I'm trying to save the details into the database. This is the part when i create the table and the columns. But I'm getting an exception error near "(".


public void onCreate(SQLiteDatabase db) {
    db.execSQL(" CREATE TABLE " + TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY AUTOINCREMENT , " + TITLE + " TEXT NOT NULL ," + TIME + " TEXT NOT NULL , " + DATE + " TEXT NOT NULL , " + DETAILS + " TEXT NOT NULL, ("+TITLE+", "+DATE+" UNIQUE)); ");
}

If anyone could help me out.

Aucun commentaire:

Enregistrer un commentaire