Sub SpRagsoc_ItemClick (Position As Int, Value As Object)
Dim m As Map
m = DBUtils.ExecuteMap(SQL, "SELECT IdCli, ragsoc, indirizzo, cap FROM Clienti WHERE IdCli = ?", _
Array As String(value))
If m = Null Then 'Null will return if there is no match
TxtRagSoc.Text = ""
TxtIndirizzo.Text = ""
Else
TxtRagsoc.Text = m.Get("ragsoc")
TxtIndirizzo.Text = m.Get("indirizzo")
End If
'Get the tests for this specific student (currently it is all tests).
' DBUtils.ExecuteSpinner(SQL, "SELECT test FROM Grades WHERE id = ?", _
' Array As String(Value), 0, spnrTests)
' spnrTests.SelectedIndex = 0
' spnrTests_ItemClick(0, spnrTests.GetItem(0))
' FindFailedTests(Value)
End Sub