dimanche 1 mai 2016

I an retriving data from Sqlite it gives me the erorr no such column . could any one help me

where=Tables.tablename_student+"."+Tables.Student.CLASS_ID+" = " +Tables.tablename_classes+"."+Tables.Classes.CLASS_ID+" and "+Tables.tablename_classes+"."+Tables.Classes.CLASSNAME+" = '"+classname+"'"; sqLiteDatabase=dBhelper.getReadableDatabase(); c=sqLiteDatabase.query(Tables.tablename_student, new String[]{Tables.Student.STUDENT_ID,Tables.Student.STUDENT_BASE_NO,Tables.Student.STUDENT_NAME,Tables.Student.STUDENT_FATHERNAME,Tables.Student.CLASS_ID}, where, null, null, null, null); if (c!=null && c.moveToFirst()) { st_id=c.getString(c.getColumnIndex(Tables.Student.CLASS_ID)); st_baseno=c.getInt(c.getColumnIndex(Tables.Student.STUDENT_BASE_NO)); st_name=c.getString(c.getColumnIndex(Tables.Student.STUDENT_NAME)); st_fathername=c.getString(c.getColumnIndex(Tables.Student.STUDENT_FATHERNAME)); st_class_id=c.getString(c.getColumnIndex(Tables.Student.CLASS_ID)); c.close(); } sqLiteDatabase.close();

Aucun commentaire:

Enregistrer un commentaire