(missing operator) in query expression

Results 1 to 2 of 2

Thread: (missing operator) in query expression

  1. #1
    Join Date
    Dec 1969

    Default (missing operator) in query expression

    I am beating my head against a wall over what is probably one tiny little thing I&#039;m missing, but have been looking at it for too long to see it. I&#039;m using an Access db, and getting this error:<BR><BR>Microsoft JET Database Engine error &#039;80040e14&#039;<BR><BR>Syntax error (missing operator) in query expression &#039;Email= myemail@mydomain.com&#039;.<BR><BR>/Fun/Adduser.asp, line 55<BR><BR>Line 55 looks like this:<BR>objRS.Open "SELECT * FROM list WHERE Email= " & email & ";", strCon, 3,3<BR><BR>I have tried this using the actual cursor and lock names but the error changes. I&#039;ve tried it with and without the semicolon after " & email & ". The email address referenced in the error is submitted by a form, and the same address does exist in the database in the Email field.<BR><BR>So what am I missing? Help?

  2. #2
    Join Date
    Dec 1969

    Default RE: (missing operator) in query expression

    When passing text values to database they must be enclosed with single quotes...<BR><BR>ie: Email = &#039;somone@somewhere.com&#039;<BR><BR>You did not use single quotes<BR> Email= " & email & ";"<BR>Should be<BR> Email= &#039;" & email & "&#039;;"

Posting Permissions

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