connection = New SqlConnection(connetionString)
Try
Dim strchklist As String = ""
Dim li As ListItem
For Each li In lbMeetingMinutes.Items
If li.Selected Then
strchklist += "," + li.Value
End If
Next
If strchklist = "" Then
Response.Write("No item Selected")
End If
connection.Open()
adapter = New SqlDataAdapter("SELECT action_id, action_ref, description, status, actioner, date_raised FROM tbl_action INNER JOIN dbo.fnSplitWithCTE(@Neighborhood,',',1) ON Neighborhood = VALUE", connection)
adapter.SelectCommand.Parameters.Add("@Neighborhood", SqlDbType.NVarChar, 150).Value = strchklist.Substring(1)
adapter.Fill(dt)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
|