On Dec 9, 4:43 pm, Chris <crehb...@gmail.com> wrote: > On Thursday, December 8, 2011 3:38:51 PM UTC-5, petter wrote: > > > No guidelines or code samples for using databases with multiple tables? > > Simple. Eg:, from the link you gave: > > > For example to run a query() you can do the following: > > >>return database.query(DATABASE_TABLE, >> new String[] { KEY_ROWID, > KEY_CATEGORY, KEY_SUMMARY, KEY_DESCRIPTION }, >> null, null, null, null, > null); > > Replace DATABASE_TABLE with DATABASE_TABLE1 or DATABASE_TABLE2 and you're > good to go. > > Cheers, > - C
Thanks. I was thinking if it's more common to do like this, e.g. one Adapter/OpenHelper file for all the tables, or a separate Adapter/ OpenHelper for each table? In the former you have to create all the tables from the single interface, in the latter one have to ensure the different Adapter/OpenHelper's implements consistency between the different tables. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en