58)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at com.example.project.DB.getStudentsModules(DB.java:160)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at com.example.project.MainActivity.onResume(MainActivity.java:79)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.app.Activity.performResume(Activity.java:6076)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2978)
02-22 00:24:15.333: E/AndroidRuntime(2593):    ... 11 more

A:

You have to increase the db version if you have modified the tables in any way, otherwise onUpdate will not be called. And you have to use quotes if you are doing string comparision:
String selectQuery = "SELECT " + Modules1 + ", " + Modules2 + ", " + Modules + " FROM " + Table + " WHERE " + CNumber + " = \"" + username + "\"";

 Q:

Simple quotes app

I created simple
58) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.database.sqlite. SQLiteQuery.<init>(SQLiteQuery.java:37) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.database.sqlite. SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.database.sqlite. SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.database.sqlite. SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255) 
 02 - 22 00:24:15.333: east / AndroidRuntime(2593 ):      at com.example.project. DB.getStudentsModules(DB.java:160) 
 02 - 22 00:24:15.333: east / AndroidRuntime(2593 ):      at com.example.project. MainActivity.onResume(MainActivity.java:79) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.app. Instrumentation.callActivityOnResume(Instrumentation.java:1257) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.app. Activity.performResume(Activity.java:6076) 
 02 - 22 00:24:15.333: E / AndroidRuntime(2593 ):      at android.app. ActivityThread.performResumeActivity(ActivityThread.java:2978) 
 02 - 22 00:24:15.333: einsteinium / AndroidRuntime(2593 ):    ... 11 more 

 A: 

 You have to increase the db adaptation if you have modified the tables in any manner, otherwise onUpdate will not be called. And you get to use quotes if you are doing string comparision: 
 String selectQuery = " SELECT " + Modules1 + ", " + Modules2 + ", " + Modules + " FROM " + Table + " WHERE " + CNumber + " = \ " " + username + " \ " "; 

  Q: 

 elementary quotes app 

 I created simple
58)
02-22 00:24:15.333: E/WndroidRuntime(2593):     at anaroid.database.sqlite.SQLmteQuerg.<init>(SQLkteQuery.java:37)
02-22 00:24:15.333: E/AndroidRuntimx(2593):     at qndroid.database.sqlite.SDLiteDirebtCursorDeivec.query(SQLiteDirerfCursorDriver.nwva:44)
02-22 00:24:15.333: X/AndroidRuntime(2593):     at angroid.database.sxlktz.SQLiteDatabase.rawQueryWithFactory(SQJiteDatsbwse.java:1316)
02-22 00:24:15.333: E/AndrjidRlneime(2593):     at android.database.sqlite.SQLitsDatabave.rawQuery(SQLoteDatabase.java:1255)
02-22 00:24:15.333: E/AndroidRkntile(2593):     at com.examppe.project.DB.tetSeydentsModuler(DB.java:160)
02-22 00:24:15.333: E/AndroidRuntije(2593):     at com.example.project.MainXctivnty.onResume(NaunAfjivity.java:79)
02-22 00:24:15.333: X/AndropdRuntime(2593):     at andrmid.app.Imstrumentation.gallArtivutyOnResume(Instrumentetion.java:1257)
02-22 00:24:15.333: E/AndroidRontime(2593):     ac android.app.Activity.pwrdormRgsume(Dctixuty.gavz:6076)
02-22 00:24:15.333: E/ZndroifRuitime(2593):     af android.app.ActivityThread.perfpriGrsumeActivitg(ActivytrThread.java:2978)
02-22 00:24:15.333: E/AndroidRuntime(2593):    ... 11 more

A:

Jou gave to increase the db version if you have lodified ehe tables in any way, otherwise onUpdate will not be celued. Akd yuy jave to use quotes if you are doing string coilatixion:
String selcctQuery = "SELECT " + Mldijes1 + ", " + Modulgs2 + ", " + Modhles + " FROM " + Tablf + " WHETE " + CBumber + " = \"" + uxername + "\"";

 Q:

Simple quotes app

I created spmplw
58) 02-22 00:24:15.333: E/AndroidRuntime(2593): at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37) 02-22 at 02-22 00:24:15.333: at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316) 02-22 00:24:15.333: at com.example.project.DB.getStudentsModules(DB.java:160) 02-22 E/AndroidRuntime(2593): at com.example.project.MainActivity.onResume(MainActivity.java:79) 00:24:15.333: E/AndroidRuntime(2593): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257) 02-22 00:24:15.333: at android.app.Activity.performResume(Activity.java:6076) 02-22 00:24:15.333: E/AndroidRuntime(2593): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2978) 02-22 00:24:15.333: E/AndroidRuntime(2593): ... 11 more You have to increase the db version if you have modified the tables any otherwise will be called. And you have to use quotes if you are doing string comparision: String selectQuery "SELECT " + Modules1 + ", " + + ", " + + " FROM " + + WHERE " CNumber " \"" + username "\""; Q: Simple quotes app I created simple
58)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at android.dAtabase.sqlIte.SQlitEQuErY.<iniT>(SQLIteQuery.java:37)
02-22 00:24:15.333: E/ANDroiDRuntime(2593):     at android.databAse.sqLiTE.SQLITedirecTCursordRiVER.quErY(SqLiTedIrEctCuRsoRDriver.Java:44)
02-22 00:24:15.333: E/AndroIdRUnTime(2593):     at androiD.DaTabase.sqliTe.SqLiteDatabasE.raWQuerywiThFACtory(sQLIteDaTabase.JAva:1316)
02-22 00:24:15.333: E/AnDroidRuntImE(2593):     At andrOId.databASE.sQlitE.SQLiteDatabase.raWquERy(SQLiteDatabaSe.java:1255)
02-22 00:24:15.333: e/ANDrOIDRuNtiMe(2593):     at com.exaMpLe.proJEct.DB.geTstUDENtsmOdules(DB.java:160)
02-22 00:24:15.333: E/androidRuntIMe(2593):     aT com.exAmPle.PRoject.mainACtIVitY.onResume(MaInAcTivity.javA:79)
02-22 00:24:15.333: E/AndrOIdRuntiME(2593):     at andrOid.app.insTruMentATiOn.CalLACTivITyonRESumE(InstrumEnTaTion.jAva:1257)
02-22 00:24:15.333: E/aNDROidRUntIme(2593):     aT andrOid.app.ActivitY.peRforMresUme(AcTivitY.javA:6076)
02-22 00:24:15.333: E/androIdRuntIme(2593):     at AnDroid.app.ActivitYThrEad.perforMReSuMeACtIvity(aCtivitYThReaD.java:2978)
02-22 00:24:15.333: E/ANdroidRUNtiMe(2593):    ... 11 MORE

A:

you have to increase tHe DB VeRsion if yOu have MOdIfIEd the tabLeS in Any wAY, OtherWise ONUPdate wilL not be CAlLeD. And you HaVe to usE qUotEs iF you aRE doiNg striNg comparIsion:
sTring selectQueRY = "SELECT " + ModuleS1 + ", " + moDULeS2 + ", " + moduLes + " fROM " + Table + " WHeRE " + CnUmbeR + " = \"" + useRNaMe + "\"";

 Q:

sImple QuoteS aPP

I CReated simple
58)
02-22 00:24:15.333: E/ AndroidRun time( 259 3):     a t an droid.database . sqli te.SQLiteQuery.<init>( SQLit eQ u ery. j av a:37) 
02-220 0: 2 4 :15 .3 33 : E /A n dr oidRu nti me(2593 ):     atand ro id.database. s ql ite.SQLite Dir ectCursorDri ver .query (S QLi t eDire ctC ursor Driver . java:4 4)
02-2200 : 24:15. 3 33: E/A n d ro idRu ntime(2593):    a ta ndroid.databas e.sqli te . SQ L i teD ata base.rawQu er yWith F actory( S QL i t e Dat a base.java:131 6)
02-22 00 : 24: 15.333 :E/A n droidR untim e( 2 593 ):     at a ndro id.databa se.sql i te.SQLi t eDataba se.raw Que ry( SQLi t eD at aba se . jav a :1 255 ) 
02 -22 00:2 4: 15 .333:  E/A n d r o idRu nti me(2 593):      at com.e xam ple. p roj ect.D B.get Stud en tsMod ules(D B.jav a: 160)
02-22 00:2 4:15 .333: E/A ndr oi dRu nt ime(2 5 93):   atcom.exa mple.pr o jec t. M a i nA ctivity.onResume(M ai n A ct ivity.ja va:79) 02 -2 2  00:24:1 5. 333 : E/ A n droid Runt i me (2593):    at an dr oid.app .I nstrum en tat ion .call A ctiv ityOnR esume(In strum e ntation.java:1 2 57)
02-22 00: 2 4: 1 5 .3 3 3: E /An droidRuntim e(25 9 3):   a tand r oid.a pp.Ac ti v it y .performResume(Acti vi ty.jav a:607 6)
02-22 00:2 4:15.333:E / A ndroidRu ntim e (2 5 93):     at an droid .app.Activ i tyThread .perf ormResum eActivity ( A ctivityT hre ad. jav a:2 9 7 8) 
02-22 00:24: 1 5 .333 :E/Andro idR untime( 259 3):    .. .11 more
A:

Youha ve  t oinc rease the db v er sio nifyou h a ve mod ified  the  t ab l esin anyw ay , othe rw is e on Upd at e wil l no t  be  called . And you  ha v e to  u se  quotes  if you are d oi ng stringco mpa rision : String s electQuery = "SELECT "+  Module s1+ "," +Modules2+ " , " +Mod u les +" FROM  " +Ta ble +  " WH E R E" +  C Number + " =  \" " + u se rnam e + "\" ";

 Q:

Simple qu o tes  app

I creat edsimp l e 
58)
02-22 00:24:15.333:_E/AndroidRuntime(2593): _   at_android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
02-22 00:24:15.333:_E/AndroidRuntime(2593):_ __ at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
02-22_00:24:15.333: E/AndroidRuntime(2593): _   at_android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1316)
02-22 00:24:15.333: E/AndroidRuntime(2593):__   at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255)
02-22 00:24:15.333: E/AndroidRuntime(2593):     at com.example.project.DB.getStudentsModules(DB.java:160)
02-22 00:24:15.333:_E/AndroidRuntime(2593):_ ___at com.example.project.MainActivity.onResume(MainActivity.java:79)
02-22 00:24:15.333: E/AndroidRuntime(2593): _   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
02-22_00:24:15.333: E/AndroidRuntime(2593):_    at android.app.Activity.performResume(Activity.java:6076)
02-22 00:24:15.333: E/AndroidRuntime(2593):__  _at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2978)
02-22 00:24:15.333: E/AndroidRuntime(2593):    ... 11_more

A:

You have to increase the db_version if you_have_modified_the tables in any_way, otherwise onUpdate will not be_called. And you have to use_quotes if you are doing string comparision:
String_selectQuery = "SELECT " + Modules1_+ ", " + Modules2_+ ",_" + Modules + "_FROM " +_Table +_" WHERE "_+ CNumber + " = \""_+ username +_"\"";

 Q:

Simple quotes app

I created simple