The error message is quite clear - you're trying to access the second row of the table, but the table doesn't have two rows.
(Remember, the collections are zero-based, so the first row is at index 0
.)
Based on the subsequent line, you want to access the
first row from the table, so you need to change the row index to
0
.
However, you should also check that the query returned a row before you try to access it.
adt.Fill(ds, "finger_data")
If ds.Tables("finger_data").Rows.Count = 0 Then
Else
Dim A As Integer = ds.Tables("finger_data").Rows(0).Item(0)
...
End If