The vb.net array participates in the query example for the SQL statement

  • 2020-05-30 19:49:04
  • OfStack

First of all, I'm going to define the array


Dim struser As New List(Of String)
struser = Session("chooseuser")
strruser = ""
For a = 0 To struser.Count - 1
If a = 0 Then
strruser = "'" & struser.Item(a).ToString.Trim & "'"
Else
strruser = strruser & " , " & "'" & struser.Item(a).ToString.Trim & "'"
End If
Next

You can then substitute strruser into the sql statement.


Related articles: