-Any idea what is causing this? Does the column "name" actually exist?

No this field does not exist. It is a bug that should be reported.

In the mean time you can simply use:

Cursor cursor = getContentResolver().query( extras.getData(), null,
null, null, null);


On Aug 22, 2:06 am, Gil <[EMAIL PROTECTED]> wrote:
> My code launches the image picker to select a photo from external
> media. In the onActivityResult I call extra.getData() to obtain the
> image Uri. I know that it is valid because I can obtain a bitmap from
> the Uri. However, when I try to get a cursor for this item for the
> purpose of getting the photo information (description, ...) I get an
> exception:
>
> Cursor cursor = MediaStore.Images.Media.query( getContentResolver(),
> extras.getData(), null);
>
> ERROR/AndroidRuntime(1463): Caused by:
> android.database.sqlite.SQLiteException: no such column: name: , while
> compiling: SELECT * FROM images WHERE (_id = 40) ORDER BY name ASC
> ERROR/AndroidRuntime(1463):     at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 143)
> ERROR/AndroidRuntime(1463):     at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 111)
> ERROR/AndroidRuntime(1463):     at
> android.content.ContentProviderProxy.bulkQuery(ContentProviderNative.java:
> 259)
> ERROR/AndroidRuntime(1463):     at
> android.content.ContentProviderProxy.query(ContentProviderNative.java:
> 278)
> ERROR/AndroidRuntime(1463):     at
> android.content.ContentResolver.query(ContentResolver.java:146)
> ERROR/AndroidRuntime(1463):     at android.provider.MediaStore$Images
> $Media.query(MediaStore.java:186)
> ERROR/AndroidRuntime(1463):     at
> com.multiplefacets.blogger.PostActivity.onActivityResult(PostActivity.java:
> 493)
> ERROR/AndroidRuntime(1463):     at
> android.app.Activity.dispatchActivityResult(Activity.java:3413)
> ERROR/AndroidRuntime(1463):     at
> android.app.ActivityThread.deliverResults(ActivityThread.java:2826)
>
> Any idea what is causing this? Does the column "name" actually exist?
--~--~---------~--~----~------------~-------~--~----~
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