a correction: in both cases: getReadableDatabase();

I am getting following exception during a database query wenn the
table is empty and orderBy is not null (either modified ASC or
modified DESC).
Is something is wrong hier?
---
logcat output
   android.database.sqlite.SQLiteException: no such column:
modified: ,
   while compiling: SELECT _id, name FROM client ORDER BY modified ASC
---

this code causes exception:

        SQLiteDatabase db = mOpenHelper.getReadableDatabase();
        Cursor c = qb.query(db, projection, selection, selectionArgs,
null, null, orderBy);


this code works:
        SQLiteDatabase db = mOpenHelper.getReadableDatabase();
        Cursor c = qb.query(db, projection, selection, selectionArgs,
null, null, null);

+++


On Aug 31, 9:32 pm, Yalcin <[EMAIL PROTECTED]> wrote:
> I am getting following exception during a database query wenn the
> table is empty and orderBy is not null (either modified ASC or
> modified DESC).
> Is something is wrong hier?
> ---
> logcat output
>    android.database.sqlite.SQLiteException: no such column:
> modified: ,
>    while compiling: SELECT _id, name FROM client ORDER BY modified ASC
> ---
>
> this code causes exception:
>
>         SQLiteDatabase db = mOpenHelper.getReadableDatabase();
>         Cursor c = qb.query(db, projection, selection, selectionArgs,
> null, null, orderBy);
>
> this code works:
>         SQLiteDatabase db = mOpenHelper.getWritableDatabase();
>         Cursor c = qb.query(db, projection, selection, selectionArgs,
> null, null, null);
>
> +++
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to