As the error message says: you are trying to get a column called 'name', but
there is no such column in your database.

On Sun, Jun 21, 2009 at 6:07 PM, Logik <[email protected]> wrote:

>
> I went through the notepad tutorial to help understand sqlite a bit
> better
> So now I am trying to utilize what has allready been written for this,
> in my
> own database
>
>
> I will actually post my code so someone may be able to pick out what
> is wrong
>
> This is the error i get:
> 06-21 19:57:35.511: ERROR/AndroidRuntime(796): Caused by:
> android.database.sqlite.SQLiteException: no such column: name: , while
> compiling: SELECT _id, name, description, retailprice, image FROM
> products
>
> This is the method its faulting on in Class: DbAdapter
>    public Cursor fetchAllProducts() {
>
>        return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID,
> KEY_NAME,
>                KEY_DESCRIPTION, KEY_RETAILPRICE, KEY_IMAGE}, null,
> null, null, null, null);
>    }
>
> if you think the error is somewhere else, then I can post more later
> >
>

--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to