I am using this simple code to create a table User in my database.
@Override
public void onCreate(SQLiteDatabase db) {
String create_t_user =
"CREATE TABLE IF NOT EXISTS user ("+
"ID int(10) NOT NULL AUTO_INCREMENT,"+
"username varchar(20) NOT NULL,"+
"password varchar(20) NOT NULL,"+
"connected binary(1) NOT NULL,"+
"PRIMARY KEY (ID));";
db.execSQL(create_t_user);
// ...
The logcat shows me an error when I try to run that code. It says
"04-28 02:49:57.146: E/AndroidRuntime(10649): android.database.sqlite.SQLiteException: near "AUTO_INCREMENT": syntax error: CREATE TABLE user (ID int(10) NOT NULL AUTO_INCREMENT,username varchar(20) NOT NULL,password varchar(20) NOT NULL,connected binary(1) NOT NULL,PRIMARY KEY (ID))"