wildcard problem

This problem may be specific to visual studio 2005 express edition, which is why I am posting it here.

I have designed a query which takes several inputs in the table adapter query configuration. without wildcards it works fine, but obviously i dont get the result i want. With the wildcards my code thinks I am giving the function too many parameters. In other words, when I put in the wildcards it doesnt think the is an input any longer.

SELECT LenderID, LenderName, LenderAddress, LenderPhone, LenderContact, LenderContactPhone, NetworkName, NetworkAddress, NetworkPhone, NetworkContact, NetworkContactPhone

FROM Lenders

WHERE (LenderID >= ) AND (LenderID <= ) AND (LenderName LIKE '% %') AND (LenderAddress LIKE '% %') AND (LenderPhone LIKE '% %') AND
(LenderContact LIKE ) AND (LenderContactPhone LIKE ) AND (NetworkName LIKE )
AND (NetworkAddress LIKE ) AND (NetworkPhone LIKE ) AND
(NetworkContact LIKE ) AND (NetworkContactPhone LIKE )

ORDER BY LenderID


So in this example, I have 12 inputs expecting, the compiler thinks that it should only take 9 inputs as the wildcards are 'hiding' the 's

Thanks in advance for any help offered.



Answer this question

wildcard problem

  • RyanT5000

    bloody fantastic, thankyou :)


  • LiuK

    You can not place a parameter inside a quote. You have to form the parameter with the surrounding % characters. Or you have to use the Concatenation like this:

    ... AND (LenderName LIKE '%' + + '%') AND ...



  • wildcard problem