android - cursor.moveToFirst() always returns false -
i using following code retrieve values db table.
public list<string> getprocedure() { list<string> labels = new arraylist<string>(); string selectquery = "select * " + tablename; sqlitedatabase db = this.getreadabledatabase(); cursor cursor = db.rawquery(selectquery, null); log.d("before", "if"); if (cursor.movetofirst()) { log.d("inside", "if"); while (cursor.movetonext()) { log.d("inside", "while"); labels.add(cursor.getstring(1)); } } cursor.close(); db.close(); return labels; }
and never log message "inside if" in logcat. mean?
i have data inside table , hence not able retrieve it! how rectify it?? please help!!
my stack trace:
e/sensormanager(6951): thread start d/sensormanager(6951): registerlistener :: handle = 4 name= mpl accel delay= 200000 listener= android.view.orientationeventlistener$sensoreventlistenerimpl@4207eb60 d/before(6951): if d/sensormanager(6951): unregisterlistener:: listener= android.view.orientationeventlistener$sensoreventlistenerimpl@4207eb60 d/sensors(6951): remain listener = sending .. normal delay 200ms i/sensors(6951): senddelay --- 200000000 d/sensormanager(6951): jni - senddelay i/sensormanager(6951): set normal delay = true d/sensormanager(6951): registerlistener :: handle = 4 name= mpl accel delay= 200000 listener= android.view.orientationeventlistener$sensoreventlistenerimpl@4207eb60 i/adreno200-eglsub(6951): <configwindowmatch:2087>: format rgba_8888. e/spannablestringbuilder(6951): span_exclusive_exclusive spans cannot have 0 length e/spannablestringbuilder(6951): span_exclusive_exclusive spans cannot have 0 length
Comments
Post a Comment