Professional Web Applications Themes

Syntax error (missing operator) in query expression - Coldfusion Database Access

Hi, I have received the following error: ODBC Error Code = 37000 (Syntax error or access violation) [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'topic='. The error occurred while processing an element with a general identifier of (CFQUERY), occupying doent position (58:1) to (58:66). i believe the error is here: <cfquery name="get_cust_topCode" datasource="dstbc" dbtype="ODBC"> SELECT * FROM a2tblTopic WHERE topicID=#form.topic# i have no idea what's wrong with my topicID? i have tried some serveral changes, such as (), '', "", and single perserve quote, but still doens't work. i have tried to just use topicID=#topic# or ...

  1. #1

    Default Syntax error (missing operator) in query expression

    Hi,
    I have received the following error:
    ODBC Error Code = 37000 (Syntax error or access violation)

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

    The error occurred while processing an element with a general identifier of
    (CFQUERY), occupying doent position (58:1) to (58:66).

    i believe the error is here:

    <cfquery name="get_cust_topCode" datasource="dstbc" dbtype="ODBC">
    SELECT *
    FROM a2tblTopic
    WHERE topicID=#form.topic#

    i have no idea what's wrong with my topicID?

    i have tried some serveral changes, such as (), '', "", and single perserve
    quote,
    but still doens't work.
    i have tried to just use topicID=#topic#
    or topicID=(#form.topic#).........

    any ideas?




    crystalfish0318 Guest

  2. #2

    Default Re: Syntax error (missing operator) in query expression

    Your error message suggests that form.topic is an empty string.
    Dan Bracuk Guest

  3. #3

    Default Re: Syntax error (missing operator) in query expression

    The error message seems indicate that the problem is with the expression
    'topic=' yet your query lists the field as topicID, so did you cut/paste the
    actual query that is causing the error into your message? I'd go back to your
    page and make sure that you actually have the field name topicID in your query.

    Phil



    paross1 Guest

  4. #4

    Default Re: Syntax error (missing operator) in query expression

    This error can be caused by a missing FROM tablename statement in the query.
    DHendricks Guest

Similar Threads

  1. Replies: 6
    Last Post: September 2nd, 01:22 PM
  2. Access: (missing operator) in query expression
    By Bob the ASP Builder in forum ASP Database
    Replies: 1
    Last Post: February 12th, 05:18 AM
  3. Syntax error in Query Expression,
    By Raphael Gluck in forum ASP
    Replies: 1
    Last Post: October 13th, 12:29 PM
  4. Replies: 4
    Last Post: September 29th, 10:23 AM
  5. Replies: 4
    Last Post: July 11th, 07:58 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139