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
Based on the subsequent line, you want to access the first
row from the table, so you need to change the row index to
However, you should also check that the query returned a row before you try to access it.
If ds.Tables("finger_data").Rows.Count = 0 Then
Dim A As Integer = ds.Tables("finger_data").Rows(0).Item(0)