Hi. have an ASP.net project with a three column SQL database containing school sporting data.
I created a table adapter as shown in the image then used the code shown below to populate a GridView with all records that had "Cricket" or "Rugby" as part of the information in the "Detail" column.
The problem is that the data is loaded only for records that contain only the word "Cricket" or "Rugby" - it doesn't work if any other data is included eg "Cricket U15" - I thought that this is how "LIKE" works
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim DS1Adapter As New DataSet1TableAdapters.Table1TableAdapter
Dim blnRugby, blnCricket, blnTennis, blnSwimming, blnHockey As Boolean
Dim SportsText1, SportsText2 As String
Dim intAgeGroup As String
intAgeGroup = Me.DropDownList1.SelectedValue