Problem with SQLiteDatabase Tutorial(Bucky's tutorial)

0 Yossathorn Tianrungroj · October 6, 2015

@Override
public void onCreate(SQLiteDatabase db) {
Log.i(TAG,"onCreate_DBHandler_start");
String query = "CREATE TABLE " + TABLE_PRODUCTS + "(" +
COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT " +
COLUMN_PRODUCTNAME + " TEXT " + ");";
db.execSQL(query);
Log.i(TAG,"onCreate_DBHandler_end");
}

Here's my code,the "onCreate_DBHandler_end" didn't popup in my log : ( .

Post a Reply

Replies

Oldest  Newest  Rating
0 Yossathorn Tianrungroj · October 10, 2015
Thank you Jun Alvarado.
+1 Jun Alvarado · October 7, 2015
Hi,

On line 5, you're missing a comma after AUTOINCREMENT.

... Hope that helps ... cheers.
  • 1

Java / Android Development

107,067 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator