In most cases retrying would be simple, I guess I could try that and see what I get...
In my case I take care of not multi-thread access the DB, so if I launch a new thread I wait for its callback until I do anything else on the DB. One question, if you open your DB as "READ-ONLY" would it matter if you access it from different threads? Any idea of why it would fail to find a table/column that exits and is not corrupted or anything? Alberto On Oct 26, 10:13 pm, Bret Foreman <bret.fore...@gmail.com> wrote: > I think you should add logic that implements a backoff delay and retry > when the table is not found. 100 mS between tries and 5 tries for a > total of 1/2 second. In the rare case where it has to retry, the user > should never notice. > > I have a lot of multi-threaded SQLite access and I had to implement > something like this to handle collisions. In my case, I randomized the > backoff time but that's not necessary unless you have multiple > threads. > > On Oct 26, 1:27 pm, Albert <albert8...@googlemail.com> wrote: > > > > > > > > > Hi, still randomly see that the DB does not recognize one of my > > tables. The table is shipped along with the database and unlike others > > is not modified at any time. I can also see through my own tests that > > the way I open the database has a great impact on this. > > > What is the recommended way to open the DB, considering that I will > > write on it? > > > SQLiteDatabase.openDatabase(myPath, null, > > SQLiteDatabase.OPEN_READWRITE); > > SQLiteDatabase.openDatabase(myPath, null, > > SQLiteDatabase.NO_LOCALIZED_COLLATORS); > > this.getWritableDatabase(); > > > the latest is working more reliable for me so far... > > > Thanks in advance. > > > On Oct 15, 3:45 pm, Albert <albert8...@googlemail.com> wrote: > > > > > I have an app that does something similar and the way I ensure that > > > > the copy is finished is that I have a special end-of-load (EOL) record > > > > that goes into the table as the last item. My app does a select for > > > > that EOL record each time it's launched. If the table isn't created > > > > yet or the EOL is missing then the app puts up a screen asking the > > > > user to wait a moment. > > > > That's a very good idea. Thanks for the tip. > > > > I have setup Acra (Error reporting) and I send myself reports when I > > > catch this exception, I see it happening with some users but I know > > > the table is there because next time the user tries the table with the > > > records are all good. I managed to get an user to send me the log and > > > I verified this. -- 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