Thanks you seem to know everything. i have named it differently, i just wrote it MyID not to publish too many info in a public forum, copywright you know. :)
i observed, the pk value is all blank... while putting in COntentValues, I am putting nothing for MyId, as I expect it to be auto generated. the create table looks like MyId INT AUTO_INCREMENT PRIMARY KEY On Dec 14, 3:02 pm, Mark Murphy <mmur...@commonsware.com> wrote: > Jags wrote: > > does that mean i wont be able to locate the db file ? > > On the emulator, you should have no problems. On a device, though, > security restrictions will prevent you from finding it. > > > I saw a data > > folder in android sdk /platforms /1.5/ but it does not follow > > structure after that like data/<pkg name>/databases > > That is your PC. You do not want to look on your PC. You want to look on > your *emulator*. > > > and there is no data folder generated in bin folder of my workspace. > > That is your PC. You do not want to look on your PC. You want to look on > your *emulator*. > > Use DDMS's File Manager, or adb push and adb pull, to work with files on > the emulator: > > http://developer.android.com/guide/developing/tools/ddms.htmlhttp://developer.android.com/guide/developing/tools/adb.html > > > but when i do a > > > long i = c.getLong(c.getColumnIndex("MyId")); > > > I get a zero, i tried getInt also, did not work. i am convinced it is > > proper pk value in the db because, MyId is INT PRIMARY KEY > > AUTO_INCREMENT > > You really should consider naming that _ID instead of MyId. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training in US: 11-15 January 2010:http://onlc.com -- 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