On Mon, Nov 8, 2010 at 8:02 PM, jtoolsdev <[email protected]> wrote:
> Let me clarify that the problem is with SimpleCursorAdapter.  Other
> parts of DBHelper are not case sensitive.   IOW, once I made a kludge
> where the from string changes case depending on the database opened
> accessing the database worked fine even if the fields were different
> case.  So try just open a database and try SimpleCursorAdapter with
> different case fields.  Will crash on 2.2 and not on 2.1 and earlier.
> So unless you were working with SimpleCursorAdapter you might not have
> seen this behavior.  Example:
>
>       // where "c" is the Cursor
>
>        final SimpleCursorAdapter la = new SimpleCursorAdapter(this,
> R.layout.atlasitem, c,
>                        new String[] { "place","_id" } , new int[]
> { android.R.id.text1 } );
>
> If  the database field is "Place"  then "place" won't work on 2.2
> though it worked on 2.1 and earlier.  You'll get an exception saying
> the field "place" does not exist.

Ah. I haven't tried that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in Atlanta: http://bignerdranch.com/classes/android

-- 
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