Question : For Loop not looping correctly

I am having trouble with a for loop not working exactly as planned.  

I am adding information to a SQL database a certain amount of times (based on a NumericUpDown).  The issue is that if the UpDown is set to 3, it will only add the data twice.  And it's not just off by 1.  I tested the UpDown at 12 and the data was only added 7 times.  If the UpDown is set to 1 or 2, it works fine.  Can anyone see what I am doing wrong?

Thanks in advance...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Dim addQB As Integer = 0

        Dim array(7) As String
        array(0) = "Mike"
        array(1) = "Dave"
        array(2) = "Brandon"
        array(3) = "Dennis"
        array(4) = "Jake"
        array(5) = "Ken"
        array(6) = "Matt"

       'NumericUpDown1.value = 7 for Testing
        For i As Integer = 0 To NumericUpDown1.Value - 1
            For addQB = 0 To NumericUpDown2.Value
                DraftStatusTableAdapter.Add_Player_Requirements(TheGMDataSet.DraftStatus, "QB", array(i))
                addQB += 1
            Next
            addQB = 0
        Next

Answer : For Loop not looping correctly

Try this:

1:
2:
3:
4:
5:
        For i As Integer = 0 To NumericUpDown1.Value - 1
            For addQB = 0 To NumericUpDown2.Value
                DraftStatusTableAdapter.Add_Player_Requirements(TheGMDataSet.DraftStatus, "QB", array(i))
            Next
        Next
Random Solutions  
 
programming4us programming4us