I still can't figure it out! This is what I use in my main activity to open the db.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); db = new DbAdapter open(this); db.open(); Which calls: public DbAdapter open() throws SQLException { mDbHelper = new DatabaseHelper(mCtx); mDb = mDbHelper.getReadableDatabase(); return this; } Any ideas of how it could skip this step? On Oct 4, 4:12 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > According to stack trace, your code gets past opening the database. > > And then: > > package.Tabs.checkListName(DbAdapter.java:310 > > ... calls db.query() passing a null value in the list of query arguments > (the new String[] { ... arg1, arg2 ... } part). > > This is not allowed, and causes the exception inside Andorid's database > classes. > > -- Kostya > > 04.10.2011 17:40, André пишет: > > > > > > > > > > > 15:02:28.791: ERROR/AndroidRuntime(8904): Caused by: > > java.lang.IllegalArgumentException: the bind value at index 1 is null > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java: > > 237) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteQuery.bindString(SQLiteQuery.java:185) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDr > > iver.java: > > 59) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.j > > ava: > > 1438) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java > > : > > 1317) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1271) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1391) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > package.Tabs.checkListName(DbAdapter.java:310) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > package.Main.getListId(Main.java:567) > > > 10-04 15:02:28.791: ERROR/AndroidRuntime(8904): at > > package.Main.fillItems(Main.java:191) > > -- > Kostya Vasilyev -- 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