On Sat, Jan 29, 2011 at 2:22 PM, André <[email protected]> wrote:
> Is there a simple way to get all my values from a column in my
> database to a String[] without having to use simpleCursorAdapter?
You would not use a SimpleCursorAdapter for that. SimpleCursorAdapter
is for taking a Cursor and putting it into an AdapterView, like a
ListView.
> When I try:
>
> String[] from = new String[]{dbManager.NAME};
>
> I only get the name of the column.
That is because you have no database.
> I'd appreciate any suggestions!
Use rawQuery() to get a Cursor. Either use the Cursor directly or
iterate over it to "get all [your] values from a column in [your]
database to a String[]"
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2
--
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