LittleNFiesty
Technical User
I have this line of code for my query and I would like it to find a particular string inside the field Industry_ID that could be P, H, or O. I have the param's set correctly but I can't remember the "=" section. I've used the LIKE before, but it won't work on this.
Product_List_cmd.CommandText = "SELECT * FROM Qry_Product_List_R_Industry WHERE Product_Cat = ? AND Industry_ID = ? ORDER BY Title,Item_No ASC"
Here is the entire code for this section in case it helps answer the question:
<%
Dim Product_List__MasterListParam
Product_List__MasterListParam = "9"
If (Request.QueryString("Product_Cat") <> "") Then
Product_List__MasterListParam = Request.QueryString("Product_Cat")
End If
%>
<%
Dim Product_List__IndustryParam
Product_List__IndustryParam = "h"
If (Request.QueryString("Industry_ID") <> "") Then
Product_List__IndustryParam = Request.QueryString("Industry_ID")
End If
%>
<%
Dim Product_List
Dim Product_List_cmd
Dim Product_List_numRows
Set Product_List_cmd = Server.CreateObject ("ADODB.Command")
Product_List_cmd.ActiveConnection = MM_AnimalSafety2_STRING
Product_List_cmd.CommandText = "SELECT * FROM Qry_Product_List_R_Industry WHERE Product_Cat = ? AND Industry_ID = ? ORDER BY Title,Item_No ASC"
Product_List_cmd.Prepared = true
Product_List_cmd.Parameters.Append Product_List_cmd.CreateParameter("param1", 200, 1, 255, Product_List__MasterListParam) ' adVarChar
Product_List_cmd.Parameters.Append Product_List_cmd.CreateParameter("param2", 200, 1, 255, Product_List__IndustryParam) ' adVarChar
Set Product_List = Product_List_cmd.Execute
Product_List_numRows = 0
%>
Product_List_cmd.CommandText = "SELECT * FROM Qry_Product_List_R_Industry WHERE Product_Cat = ? AND Industry_ID = ? ORDER BY Title,Item_No ASC"
Here is the entire code for this section in case it helps answer the question:
<%
Dim Product_List__MasterListParam
Product_List__MasterListParam = "9"
If (Request.QueryString("Product_Cat") <> "") Then
Product_List__MasterListParam = Request.QueryString("Product_Cat")
End If
%>
<%
Dim Product_List__IndustryParam
Product_List__IndustryParam = "h"
If (Request.QueryString("Industry_ID") <> "") Then
Product_List__IndustryParam = Request.QueryString("Industry_ID")
End If
%>
<%
Dim Product_List
Dim Product_List_cmd
Dim Product_List_numRows
Set Product_List_cmd = Server.CreateObject ("ADODB.Command")
Product_List_cmd.ActiveConnection = MM_AnimalSafety2_STRING
Product_List_cmd.CommandText = "SELECT * FROM Qry_Product_List_R_Industry WHERE Product_Cat = ? AND Industry_ID = ? ORDER BY Title,Item_No ASC"
Product_List_cmd.Prepared = true
Product_List_cmd.Parameters.Append Product_List_cmd.CreateParameter("param1", 200, 1, 255, Product_List__MasterListParam) ' adVarChar
Product_List_cmd.Parameters.Append Product_List_cmd.CreateParameter("param2", 200, 1, 255, Product_List__IndustryParam) ' adVarChar
Set Product_List = Product_List_cmd.Execute
Product_List_numRows = 0
%>