>Eric this is what I did and the error I got,
>
>C_BusinessName="Bob's Funny Farm"
>sqlQuery2 = "SELECT * FROM CustomerInfo WHERE BusinessName='"&C_BusinessName&"'"
>set objRec2 = Server.CreateObject("ADODB.Recordset")
>objRec2.open sqlQuery2, objCmd, adOpenKeyset, adLockOptimistic, adCmdText
>
>and upon load the ASP page I got the next error:
>
>Microsoft OLE DB Provider for SQL Server error '80040e14'
>Line 1: Incorrect syntax near 's'.
>/sgtest.asp, line 15
Try this:
C_BusinessName=replace("Bob's Funny Farm", "'", "''")
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com