Wednesday, December 25, 2013

Creating Data Base tables in Android programatically

For me SQlite syntax is quite confusing  and difficult job . For creating below String

private static final String CREATE_TABLE_TODO = "CREATE TABLE "
            + TABLE_TODO + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_TODO
            + " TEXT," + KEY_STATUS + " INTEGER" ;

So created a function , which will create SQlite syntac for table creation
And created object , which need to be passed to the  function