Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    3

    Unanswered: Syntax error (missing operator) in query expression

    This is the full error:

    Microsoft JET Database Engine error '80040e14'
    Syntax error (missing operator) in query expression 'Band = ''A Perfect Circle'''.
    /results.asp, line 20

    And here is the code Dreamweaver creates:

    Set results = Server.CreateObject("ADODB.Recordset")
    results.ActiveConnection = MM_shnlist_STRING
    results.Source = "SELECT * FROM Bands WHERE Band = '" + Replace(results__MMColParam, "'", "''") + "'"
    results.CursorType = 0
    results.CursorLocation = 2
    results.LockType = 1
    results.Open()

    It says the error is on the last line "results.Open()"

    How do I fix this?

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    Midwest
    Posts
    138
    dreamweaver sucks at creating and maintaining database connections...try running the query in the database itself, then compare the database query with the query dreamweaver created.

  3. #3
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    I copied and pasted what you wrote to an editor:
    'Band = ''A Perfect Circle'''

    And I noticed that all the quotes are single quotes. I.e. even what looks like a double quote is really two single quotes.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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