vendredi 28 août 2015

Sqlite Join error

I am trying to connect 2 tables to extract values from them, but I get an error that does not do.

CODE:

Class Product:

public void onCreate(SQLiteDatabase db) {

        db.execSQL("CREATE TABLE PRODUCT (ID INTEGER, NOMBRE TEXT, PRECIO REAL, CANTIDAD INTEGER, ESTADO CHAR(1), PRIMARY KEY(ID))");
    }

LINE OF ERROR:

SQLiteDatabase bd2 = admin.getWritableDatabase();

fbd2 = bd2.rawQuery("SELECT ID, CANTIDAD, MONTO, PRECIO, NOMBRE FROM PRODUCT P INNER JOIN CUERPO C ON PRODUCT.ID = CUERPO.ID_PRODUCT", null);

ERROR:

no such table: PRODUCT

Aucun commentaire:

Enregistrer un commentaire