• So you want to see whether the Searchname appears anywhere in the database?  To do that you'd need to loop through every character column in every table.  If you have a large database, that's going to be very slow.  You might be better off using full text indexing.

    But before you go ahead with anything, make sure you read about and understand SQL injection.  The way you're trying to do this is, as it stands, a massive security risk.

    John