Sandip Armal Patil
Sandip Armal Patil

Reputation: 5905

how to use listview to fetch the record from sqlite

I create database and one table TABLE_NAME. I need to fetch all record from
this table to list view. after this list view should be enable for
delete the record. i am novice at android and i don't know how to use the list view.
Please Provide me some code or reference.
Thanks in advance..

Upvotes: 0

Views: 715

Answers (2)

AndroidHelp
AndroidHelp

Reputation: 44

Try this class for create and copy Database and also get and delete records..
http://code.google.com/p/nithin-warriers-code-base/source/browse/trunk/SampleDatabase/src/com/smartandroidians/database/DBHelper.java?spec=svn10&r=10

after implement this class u need to add get and delete finction to this class..
if any query ask freely...

Upvotes: 2

Soham
Soham

Reputation: 4960

The best approach would be to use a 'CursorAdapter' to link the database and the ListView. For more check out this example: http://www.vogella.de/articles/AndroidListView/article.html

Upvotes: 1

Related Questions