When you response.write the query what do you get? Paste this into query analyser and see if it runs.
Your code will only match on exact name, if you want "begins with" then add a percentage sign:
MyQuery = " Select CompanyName, Address from NorthWind.dbo.Suppliers where CompanyName like '" & cname & "%'"
I would use a stored procedure. It's safer and you don't need to worry about replacing quotes etc.
--
Joe (
Microsoft MVP - XML)