Very well my problem is that I am making a form, and I have a txt that is in charge of searching, but I even have to put the manual data in the query for it to work, and what I want is for it to take the value of the txt to search for from there: I leave the code in a summarized way View
<td>
<asp:TextBox CssClass="form-control" ID="txt_clasif" runat="server" ReadOnly="false" Text=""></asp:TextBox>
</td>
Query:
Dim buscarclasif As String = txt_clasif.Text
sqlQuery = sqlQuery & " and tc.nombre_clasif like '%%'"
Inside the percentages I put my values but I don't know how to put what goes in my search text box:
dbComm = New MySqlCommand(sqlQuery, dbConn)
dbComm.Parameters.AddWithValue("?nombre_clasif", buscarclasif)
Your query is a string that does not receive parameters as such, the parameters are used when you use a stored procedure, in this case you must concatenate the value of the textbox with your query.
In addition to this example implementation... you should be concerned in this and all your queries that you make to prevent sql injection (strings that can modify your main query and execute code that does not correspond to the behavior that the application should have).