Trying to pass the value from the above. It works fine when the selection is only one state,however, if the selection is more than one i get an error msg.
here is what i wanted to do
Sql = Sql & "AND R.ASTATE IN ('MN',WI','RI') something like this can some one help. thanks
Dim strState As String = ""
For Each liThisOne In lstState.Items
If liThisOne.Selected Then
strState = strState & "(" & "'" & liThisOne.Value & "'" & ")" & " , "
End If
Next
Response.Write("Vendor Name " & strState & "<br />")
If strState.Length > 0 Then
gvSearch.Visible = True
strState = Left(strState, strState.Length - 3)
here is clip of my sql statement
Sql = Sql & "AND R.ASTATE IN" & strState
here is what i wanted to do
Sql = Sql & "AND R.ASTATE IN ('MN',WI','RI') something like this can some one help. thanks
Dim strState As String = ""
For Each liThisOne In lstState.Items
If liThisOne.Selected Then
strState = strState & "(" & "'" & liThisOne.Value & "'" & ")" & " , "
End If
Next
Response.Write("Vendor Name " & strState & "<br />")
If strState.Length > 0 Then
gvSearch.Visible = True
strState = Left(strState, strState.Length - 3)
here is clip of my sql statement
Sql = Sql & "AND R.ASTATE IN" & strState