Results 1 to 3 of 3

Thread: Stupid Syntax, Give me a hand

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    63

    Stupid Syntax, Give me a hand

    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

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    Do you receive all the variables from the other side.

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

  3. #3
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    for access DB, it is %, as you said,

    other than that, everything looks fine!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width