> Also do i have to use the android.database.sqlite.SQLiteQueryBuilder
> for building and running the SELECT query?
No. It is there as a convenience. I only use it for creating
SQLite-backed content providers.
> Can you provide me with a sample code for fetching data from table.
Unfortunately, the ApiDemos only have SQLite as used by a content provider.
If you want sample uses of SQLiteOpenHelper or SQLiteDatabase, you can
find 100+ up on Google Code Search:
http://www.google.com/codesearch
Add "package:android" to your list of search terms, and you'll restrict
your search to only Android-related code.
There is also an example of non-ContentProvider SQLite usage in the
source code to _Android Programming Tutorials_:
http://commonsware.com/AndTutorials
(see Tutorial 12)
If those examples are insufficient, I recommend you pick up a book that
covers this topic. Here are four:
_The Busy Coder's Guide to Android Development_, Version 2.1, pages 271-282
_Android Programming Tutorials_, Version 1.0, pages 93-108
_Professional Android Application Development_, pages 175-188
_Android Wireless Application Development_, pages 257-275
There probably are other books that cover this as well, but these were
the ones that either I wrote or had their tables of contents up on
Amazon for easy searching.
If you want to get deeper into SQLite beyond Android, I recommend _The
Definitive Guide to SQLite_.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
_Android Programming Tutorials_ Version 1.0 In Print!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment