- Mar 1, 2000
- 30,859
- 4,976
- 126
I have the following loop:
For COUNT As Integer = 1 To 5
If (COUNT = 6) Then
Exit For
End If
SQL = "INSERT INTO CALL_AUDIT_SCORES (AUDIT_NO, SECTION, TOPIC_NO, TOPIC_TEXT)" & _
"VALUES ('" & (FILENO.Text + "-" + COLL_NO.Text + "-" + DateTime.Now.ToString("yyyyMMdd")) & "','OPENING','" & COUNT & "','" & OPENING_1_TOPIC.Text & "')"
'Dim Adapter As SqlDataAdapter = New SqlDataAdapter(SQL, cn)
Adapter = New SqlDataAdapter(SQL, cn)
rs = New DataSet
Adapter.Fill(rs, "master")
cn.Close()
Next
But what I want to do is make the 1 in OPENING_1_TOPIC equal to COUNT
So as it loops through, I get OPENING_1_TOPIC, OPENING_2_TOPIC, OPENING_3_TOPIC, OPENING_4_TOPIC, and OPENING_5_TOPIC
Ideas?
For COUNT As Integer = 1 To 5
If (COUNT = 6) Then
Exit For
End If
SQL = "INSERT INTO CALL_AUDIT_SCORES (AUDIT_NO, SECTION, TOPIC_NO, TOPIC_TEXT)" & _
"VALUES ('" & (FILENO.Text + "-" + COLL_NO.Text + "-" + DateTime.Now.ToString("yyyyMMdd")) & "','OPENING','" & COUNT & "','" & OPENING_1_TOPIC.Text & "')"
'Dim Adapter As SqlDataAdapter = New SqlDataAdapter(SQL, cn)
Adapter = New SqlDataAdapter(SQL, cn)
rs = New DataSet
Adapter.Fill(rs, "master")
cn.Close()
Next
But what I want to do is make the 1 in OPENING_1_TOPIC equal to COUNT
So as it loops through, I get OPENING_1_TOPIC, OPENING_2_TOPIC, OPENING_3_TOPIC, OPENING_4_TOPIC, and OPENING_5_TOPIC
Ideas?