ASP and SQL Server Select with LIKE

I have a stored procedure that does a:
------------------------------------------------
SELECT company_name from COMPANY where company_name = @company
------------------------------------------------
My ASP is:
------------------------------------------------
dim company

company = Request.Form("company")


Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")


strSQL = "sp_company_search" & chr(39) & company & chr(39)
      
objRS.Open strSQL, objConn, , adCmdStoredProc
------------------------------------------------

How can I change this for a like statement so that it will look for a company_name LIKE what was entered.  For example, if the user enters "ABC" into the text field the query will return "ABC Corp" as a result.

Thanks in advance.
rudyflyerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
you might pass a %

strSQL = "sp_company_search" & chr(39) & company & "%" & chr(39)


the code in the procedure:
SELECT company_name from COMPANY where company_name LIKE @company

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thefritterfatboyCommented:
Or, if you only want to make a change in one place:

Change the sotred procedure to:

SELECT company_name from COMPANY where company_name LIKE @company + '%'

If you want a search for "BC" to also find "ABC Corp", you chould change the stored procedure to look like:

SELECT company_name from COMPANY where company_name LIKE '%' + @company + '%'
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.