You could also just add "id AS _id" to your query, and that way you won't have to process the downloaded database at all, you'll just do it as part of your queries.
On Mon, Oct 12, 2009 at 8:26 AM, Wouter <[email protected]> wrote: > > It is an sqlite database but don't now why it has no _id but id (for > iPhone? ) > > Ok i will try your sample code! Thanks, Wouter > > On 12 okt, 17:23, Marco Nelissen <[email protected]> wrote: >> On Mon, Oct 12, 2009 at 8:12 AM, Wouter <[email protected]> wrote: >> >> > Hey, >> >> > I have a database that I download external and save on my sdcard. >> > But this database is also used for an iPhone app and has a column id >> > and not _id (sqlite uses _id). >> > How can i rename this column to _id? >> >> So this is not a sqlite database? What does it matter what the column >> is named then, if you won't be able to access it with sqlite anyway? >> In any case, sqlite doesn't support renaming columns, but you can >> usually do things like that with something like "create table foo as >> select id as _id, a as b, c as d from bar" to import all the data in >> to another table with exactly those columns and names you want. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

