Skip to content

Tag: android

SQL – How to return a list of data

I have this SQL method below, it is suppose to return multiple rows of data, but it is only returning one item every time I try to display the data. How do I fix that? Answer Inside the while loop in each iteration you change the value of LikeSong, so when the loop ends, LikeSong has the last value assigned

Problems with SQLiteException: no such table

I have a database with two tables and every time I try to add a new item to the second table it says that there is no such table. Please help. DatabaseHelper: The add method from DatabaseHelper: The place where the new item creation is: Answer you may have changed the schema and did not increase the db versio…

Android Studio Null object Reference

Creating an question/answer test application that scores you based on how many attempts it took to get it right (i.e on the first attempt 5 points, 2nd attempt 4 points… and so on) the questions are stored in a .DB file in asset folder and after testing the scoring logic I’m now trying to draw fro…