I would like to set the position of a spinner item, but the spinner is being populated with a simplecursoradapter with data from a database. I would like to get the current string from the database, then set the spinner to that value. I know that by using an arrayadapter I can get the position from the adapter this way:

```
String myString = queryData.getString(queryData.getColumnIndex("myString"));

//cast to an ArrayAdapter
mySpinnerAdapter adapter = (mySpinnerAdapter) mySpinner.getAdapter(); 
int spinnerPosition = ?

//set the default according to value
mySpinner.setSelection(spinnerPosition);

```

But is there a way to get the position of an item from a SimpleCursorAdapter? In the past I have always build an array of my spinner data along side the cursoradapter, but this seems like a dirty way of doing it. If its the only way though...