Thanks Bob
I think there is something fundamental I'm missing here.
I am not using dynamic SQL, my query resides on Access so in the Access
application the WHERE clause below returns over 1000 records:
WHERE (((Example.Example) Like "*" & [pSearch] & "*"));
While this returns 0 records:
WHERE (((Example.Example) Like "%" & [pSearch] & "%"));
Both of these WHERE clasues return 0 records to my ASP page.
So how do I use "%" in my situation?
"Bob Barrows [MVP]" <> wrote in message
news:...
> Dave wrote:
>> This is my query named "spVOC_Sp_Example_search" in Access 2003:
>>
>> PARAMETERS [pSearch] Text ( 255 );
>> SELECT Example.Example
>> FROM Example
>> WHERE (((Example.Example) Like "*" & [pSearch] & "*"));
>>
>
>> How do I properly call an Access parameterized wildcard query from
>> ASP?
>
> In order to call the query via ADO, you must change the Jet wildcards to
> ODBc wildcards:
>
> WHERE (((Example.Example) Like "%" & [pSearch] & "%"));
>
> Then you can simply call it by:
>
> set rs=createobject("adodb.recordset")
> cn.spVOC_Sp_Example_search "a", rs
>
> See:
> http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl
>
> http://groups.google.com/groups?hl=e...tngp13.phx.gbl
>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>