Parameterized Querys
Posted: Mon 05 Dec 2005 19:26
I have set up a query using the MySQLDataAdapter Editor. The query contains four parameters, though for simplicity I show only two parameters in the following example:
SELECT * FROM Materials WHERE (Type=@Type) AND (Material=@Material)
When using the query, there are times when I want to specify only one parameter. Is there any way to set the unused parameter to the equivalent of a wildcard character so it accepts all values? If I leave the parameter blank or set it to Nothing I get zero results from the query.
SELECT * FROM Materials WHERE (Type=@Type) AND (Material=@Material)
When using the query, there are times when I want to specify only one parameter. Is there any way to set the unused parameter to the equivalent of a wildcard character so it accepts all values? If I leave the parameter blank or set it to Nothing I get zero results from the query.