Sub SongACaso(EntryIndex2 AsInt) ' il db normaleDim Cursor3 AsCursorDim Titolo AsStringDim MapTitolo AsStringDim i,MapID AsInt'If IDList.Size = 0 Then 'check if the database is empty
' Return 'if yes leave the routine
'End If
Titolo = spnRepertorio.SelectedItem
Cursor3 = SQL1.ExecQuery("SELECT * FROM [" & TblSpin & "] WHERE [" & GestioneTbl.ColNames(2) & "] = Titolo")
For i=0To Mappa.Size-1
MapTitolo=Mappa.GetValueAt(i)
MapID=Mappa.GetKeyAt(i)
If MapTitolo=Titolo Then
Cursor3.position=MapIDExitEndIfNext
Cursor3.position=MapID
Label1.Text=MapID & "" & MapTitolo& " = " & Titolo
TxtId.Text = Cursor3.GetString(GestioneTbl.ColNames(0))
TxtProg.Text = Cursor3.GetString(GestioneTbl.ColNames(1)) 'read the FirstName columnTxtTitolo.Text = Cursor3.GetString(GestioneTbl.ColNames(2)) 'read the LasstName column
Cursor3.Close 'close the cursor, we don't it anymoreEnd Sub