I think I do get what the PO means, perhaps use a key-value pair.
1. The items you want to show in the spinner, define them as a map
Dim items As Map
items.Initialize
items.put("--Nothing Selected--", "-")
items.put("A first item", "a")
items.put("B second item", "b")
items.put("C third item", "c")
2. Add the items to the Spinner
For each item as string in items.Keys
cboSpinner.Add(item)
next
3. Store the items in the tag of the spinner
4. Set the index to zero (when you initialy read content from db)
cboSpinner.SelectedIndex = 0
5. Get selected key of value, assuming that in the db you want to store "c", you want "C third item" to appear on the spinner
'get the selected topic from combo
Sub GetSelectedItem As String
'get the selected item
Dim value As String = cboSpinner.SelectedItem
items = cboSpinner.Tag
If items.IsInitialized Then
If items.ContainsKey(value) Then
Dim key As String = items.Get(value)
Return key
Else
Return ""
End If
Else
Return ""
End If
End Sub
This will return "c" for "C third item")
usage..
dim myselection = GetSelectedItem
6. Now the value has been stored in the db, you retrieve it and then want to update the spinner, so then you want to do the inverse of GetSelectedItem, you want to SetSelectedItem or whatever.
Lets say the key is now "a" from the db.
Sub SetSpinnerByID(key As String)
If key = "" Then
cboSpinner.SelectedIndex = 0
Return
End If
'read the tag values
items = cboSpinner.Tag
If items.IsInitialized Then
For Each k As String In items.Keys
Dim v As String = items.Get(k)
If key = v Then
'get the index
Dim idx As Int = cboSpinner.IndexOf(k)
cboSpinner.SelectedIndex = idx
Exit
End If
Next
End If
End Sub
All the best!