Thank you for your help . On Apr 1, 4:54 pm, Mark Murphy <mmur...@commonsware.com> wrote: > elham wrote: > > Hello , I want to create a table whose primary key will be some > > other field and not _id . The below table gets created but the value > > of _id remains null : > > > "create table accounts ("+BaseColumns._ID+" integer , profile_name > > text primary key" > > +" name text not null);"; > > > My doubt is wont _id get auto incremented if we do not place > > "+BaseColumns._ID integer primary key autoincrement+" . > > > Kindly assist . > > You have two choices that I can see: > > 1. Use integer primary key autoincrement and deal with the fact that you > have two distinct primary keys > > 2. Do not use CursorAdapter or its subclasses, but create your own > Adapter that uses your own primary key > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _Beginning Android 2_ from Apress Now Available!
-- 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 To unsubscribe, reply using "remove me" as the subject.