Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder("insert into snht(")
Dim i As Integer = 0
Dim j As Integer = 0
For Each li As ListItem In Me.CheckBoxList1.Items
If li.Selected Then
i = i + 1
If i <> 1 Then sb.Append(",")
sb.Append(li.Text)
End If
Next
sb.Append(")")
sb.Append(" values(")
For Each li As ListItem In Me.CheckBoxList1.Items
If li.Selected Then
j = j + 1
If j <> 1 Then sb.Append(",")
sb.Append("@" + li.Text)
End If
Next
sb.Append(")")
Me.TextBox4.Text = sb.ToString()