0

it keeps telling me column _id doesn't exist and in my whole code I didn't find the word _id

public static final String TABLE_NAME = "LIST";

public static final String _ID = "_Id";
public static final String PRODUCT_NAME = "Product";

static final String DB_NAME = "LIST.DB";

static final int DB_VERSION = 1;

private SQLiteDatabase database;

private static final String CREATE_TABLE = " CREATE TABLE " + TABLE_NAME + "(" + _ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + PRODUCT_NAME + " TEXT NOT NULL );";

final String[] from = new String[]
            {DatabaseHelper. _ID , DatabaseHelper. PRODUCT_NAME};

final  int[] to = new int[]
            {R.id._Id , R.id.Product};

adapter = new SimpleCursorAdapter(this ,R.layout.viewrecord , c , from , to , 0);
        listView.setAdapter(adapter);
aturan23
  • 4,798
  • 4
  • 28
  • 52
Ahmed Tambal
  • 43
  • 1
  • 1
  • 6

0 Answers0