[android-developers] SQLiteOpenHelper

2011-06-20 Thread Jorge Luis
Hi guys, i have a class dbHelper which creates my database, it's a SQLiteOpenHelper. So if i reffer to it like dBHelper base = new dbHelper(this); and then SQLiteDatabase db = base.GetWritableDatabase(); it should work, right? But when i try db.insert(TABLE, NULL, VALUES); it does not show

[android-developers] SQLiteOpenHelper per activity??

2010-07-21 Thread ecforu
Do I need an instance of my SQLiteOpenHelper class for each Activity I have? I have 1 currently that all activities access, but started getting an exception illegal state exception SQLiteDatabase created and never closed on simple a simple query and I can't seem to figure out why this is

[android-developers] SQLiteOpenHelper documentation not clear.

2010-07-09 Thread martinlong1978
Hi, The documentation does not make the interation between onUpgrade() and onCreate() clear. When implementing onCreate() should this create the database at version 1, assuming that onUpgrade will apply all of the patches to bring it up to version x (lets say version 5 for example)? Or should

[android-developers] SQLiteOpenHelper

2009-12-06 Thread Jags
I was trying to do some SQLite stuff. I looked at NotePadProvider in Samples. I understood that this class is probably instantiated through provider tag in manifest. I am a little confused how can I use this externally. For example if i wrote my content provider class, and provide the provider

[android-developers] SqliteOpenHelper db adapter design question

2009-07-29 Thread Chris Ho
Hi all, I am writing an app that has a single database file with 3 tables ( AudioTable, PeopleMap, ImageTable) and am looking at 2 design alternatives: 1. A -single- database adapter (myDBAdapter.java) which uses a database helper class that extends SQLiteOpenHelper. The adapter class has

[android-developers] SqliteOpenHelper db adapter design question

2009-07-29 Thread Chris Ho
Hi all, I am writing an app that has a single database file with 3 tables ( AudioTable, PeopleMap, ImageTable) and am looking at 2 design alternatives: 1. A -single- database adapter (myDBAdapter.java) which uses a database helper class that extends SQLiteOpenHelper. The adapter class has

[android-developers] SQLiteOpenHelper and concurrency

2009-06-26 Thread Daniel
Hi, I am currently doing an app that asynchronously populates a list view at startup using AsyncTask. Therefore the AsyncTask uses SQLiteOpenHelper.getReadableDatabase to read some data. At the app's shutdown (onPause) the UI thread is writing some new data to the database after using

[android-developers] SQLiteOpenHelper and concurrency

2009-06-26 Thread Daniel
Hi, I am currently doing an app that asynchronously populates a list view at startup using AsyncTask. Therefore the AsyncTask uses SQLiteOpenHelper.getReadableDatabase to read some data. At the app's shutdown (onPause) the UI thread is writing some new data to the database after using