0

I believed that DataTable which in C# is to hold data which we fetched from DB. I have application where I need to implement something similar in Android using Java. I need to save/hold the data which I fetched from DB for different activity. Can anyone suggest or share how do I achieve this. I tried use ResulSet but ResultSet holds all the data meanwhile I want to get the filtered data where something like DataRow in C#. Please help.

chinna_82
  • 6,353
  • 17
  • 79
  • 134
  • try creating your own object e.g. http://zendguru.wordpress.com/2009/02/24/java-creating-data-table-in-java/ – Zaki Mar 26 '12 at 09:22

3 Answers3

1

Check out these three classes in SDK, It should do similar functionality.

  1. ResultSet

  2. Cursor

  3. ContentProvider

srinathhs
  • 1,998
  • 4
  • 19
  • 33
0

If you are using eclipse then you can use SQlite Browser to store your database and then can push data base in ur device by going to Window->Open perspective->other->DDMS how can we push ".db" into emulator? and then u can apply queries on your database. http://www.vogella.de/articles/AndroidSQLite/article.html

Community
  • 1
  • 1
user182022
  • 76
  • 7
0

I had the same problem and re-implemented the C# DataTable, DataRow stuff, since Cursors to a SQLiteDatabase don't write back changes to DB, afaik.

Bondax
  • 3,143
  • 28
  • 35