I get a Syntax error when my app tries to create a sqlite table.
this is the code that creates the table:
@Override
public void onCreate(SQLiteDatabase db) {
String SQL = pictureTable();
db.execSQL(SQL);
}
private String pictureTable() {
return "CREATE TABLE geophoto_db_pictures ( picid integer,"
+ "name character varying(50),"
+ "city character varying(20) NOT NULL DEFAULT 'Unknown',"
+ "zipcode character varying(20) NOT NULL DEFAULT 'Unknown',"
+ "country character varying(20) NOT NULL DEFAULT 'Unknown',"
+ "picdate datetime NOT NULL DEFAULT DATETIME('now'),"
+ "tags character varying(200)," + "image BLOB NOT NULL,"
+ "uploaded integer NOT NULL DEFAULT 0, PRIMARY KEY (picid))";
}
The error is: android.database.sqlite.SQLiteException: near "(":sytax error (code 1)
Any help is greatly appreciated !