Hi there,
The problem of Object Expected is caused by the fact that the Trim method is
VB Script ASP.
AFAIK, JavaScript / JScript does not support the Trim method natively. This should work:
Code:
mySQL = mySQL + " contractorservices like '" + Request.Form("projectTradesNeeded") + "%'";
If you still need to trim the QueryString, you may need to code some additional logic. Otherwise, just leave it out and it should work.
If you want to perform a true LIKE (where the search string can be anywhere in the column's value), you'll need to add an additional % before the Request.Form:
Code:
mySQL = mySQL + " contractorservices like '%" + Request.Form("projectTradesNeeded") + "%'";
BTW, you say MySQL.... Are you referring to the mySQL statement, or are you referring to the MySQL product??
Cheers,
Imar