is there an exampl on how to use listview with sqlite to read all rows in table at once or what do i change in the curser to make it read all the tittles at once
//---get all titles---
db.open();
Cursor c = db.getAllTitles();
String text = "";
if (c.moveToFirst())
{
do {
DisplayTitle(c, text);
} while (c.moveToNext());
}
db.close();
}
public void DisplayTitle(Cursor c, String text)
{
ListView.setText("id: " + c.getString(0) + "\n" + "ISBN: " + c.getString(1)
+ "\n" + "TITLE: " + c.getString(2) + "\n" + "PUBLISHER: " + c.getString(3));
}
//---retrieves all the titles---
public Cursor getAllTitles()
{
return db.query(DATABASE_TABLE, new String[] {
KEY_ROWID,
KEY_ISBN,
KEY_TITLE,
KEY_PUBLISHER},
null,
null,
null,
null,
null);
}