my logcat message:
(1) near "INTEGER" : syntax error Exception in CREATE_SQL android.database.sqlite.SQLiteException: near "INTEGER" : syntax error (codee1): , while compiling: create BOMUL_PLACE( _id INTEGER NOT NULL PRIMARY KEY AUTOICREMENT, NAME TEXT, LAT DOUBLE, LNG DOUBLE, CHECK INTEGER DEFAULT 0);
and my code :
public void onCreate(SQLiteDatabase db) { //TABLE_BOMUL_PLACE println("creating table [" + TABLE_BOMUL_PLACE + "].");
//drop existing table
String DROP_SQL = "drop table if exists " + TABLE_BOMUL_PLACE;
try
{
db.execSQL(DROP_SQL);
}
catch(Exception ex)
{
Log.e(TAG, "Exception in DROP_SQL", ex);
}
String CREATE_SQL = "create table " + TABLE_BOMUL_PLACE + "("
+ " _id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "
+ " NAME TEXT, "
+ " LAT DOUBLE, "
+ " LNG DOUBLE, "
+ " CHECK INTEGER DEFAULT 0);";
try
{
db.execSQL(CREATE_SQL);
}
catch(Exception ex)
{
Log.e(TAG, "Exception in CREATE_SQL", ex);
}