ISSUE (LogCat)
sqlite returned: error code = 1, msg = no such table ...
android.database.sqlite.SQLiteException: no such table: ....
CODE
public void onCreate(SQLiteDatabase db) {
Log.v("SQLAdapter","onCreate(SQLiteDatabase db)");
db.execSQL("CREATE TABLE "+tablename
+" ("
+col1+ " TEXT PRIMARY KEY , "
+col2+ " TEXT , "
+col3+ " TEXT , "
+col4+ " TEXT , "
+col5+ " TEXT , "
+col6+ " TEXT , "
+col7+ " TEXT , "
+col8+ " TEXT "
+")");
db.execSQL("CREATE TABLE "+configTable
+" ("
+colName+ " TEXT PRIMARY KEY , "
+colValue+ " TEXT "
+")");
ContentValues cv=new ContentValues();
cv.put(colName, "updated");
cv.put(colValue, "-1");
db.insert(configTable, colName, cv);
}
RESULT
configTable is being created
tablename is not being created
simply Change Your Databse name in Data base class which you implemented Using SQliteDatabase
same problem i faced , isolved using same trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With