PDA

Click to See Complete Forum and Search --> : Stupid Syntax, Give me a hand


HakanAzaklioglu
Jul 9th, 2001, 08:57 AM
What am i doing wrong here. This is tying into an access database so i am pretty sure the *'s should be % but other than that does anybody see a problem with this code

<line 6> set rsEmps = conn.Execute("select * from DomainCompanyList where " _
<line 7> & Request.Form("txtIn") & " Like '*" _
<line 8> & Request.Form("txtFind") & "*'")

Error Message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Like '**''.

/domainpwd/domainsearch.asp, line 6

What am i doing wrong here. This is tying into an access database so i am pretty sure the *'s should be % but other than that does anybody see a problem with this code

Sundance Kid
Jul 9th, 2001, 09:08 AM
Do you receive all the variables from the other side.

Before you execute the SQL statment, see what it is!

sebs
Jul 9th, 2001, 10:39 AM
for access DB, it is %, as you said,

other than that, everything looks fine!!