What am I doing wrong???!?!

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default What am I doing wrong???!?!

    I have a simple form that based on the the two inputs, ExAD_Tracking and
    ExAD_DateEntered, will query the database and display the records accordingly.
    This code worked fine in previous versions of ColdFusion, but now after
    upgrading to MX7, it is returning an error of Too Few Parameters and I am very
    frustrated and at a loss. Please help.

    This is the error:

    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
    Access Driver] Too few parameters. Expected 2.

    The error occurred in C:\Websites\CM\CostDB\tracking2.cfm: line 12

    10 : SELECT *
    11 : FROM AddComments
    12 : WHERE ExAdID = #Tracking.ExAdID# AND Public='Yes'
    13 : ORDER BY Date DESC, Time DESC
    14 : </CFQUERY>




    --------------------------------------------------------------------------------

    SQL SELECT * FROM AddComments WHERE ExAdID = 1378 AND Public='Yes' ORDER BY
    Date DESC, Time DESC
    DATASOURCE CostDB
    VENDORERRORCODE -3010
    SQLSTATE 07002

    Please try the following:
    Check the ColdFusion documentation to verify that you are using the correct
    syntax.
    Search the Knowledge Base to find a solution to your problem.


    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    Remote Address 127.0.0.1
    Referrer [url]http://localhost/cm/costdb/tracking.cfm[/url]
    Date/Time 30-Jun-05 10:28 AM

    Stack Trace (click to expand)

    This is my code:



    <CFQUERY NAME="Tracking" DATASOURCE="CostDB">
    SELECT *
    FROM tabExAd
    WHERE ExAd_Tracking='#Form.ExAd_Tracking#' AND
    ExAd_DateEntered='#Form.ExAd_DateEntered#'
    </CFQUERY>

    <CFQUERY Name="AdminComments" Datasource="CostDB">
    SELECT *
    FROM AddComments
    WHERE ExAdID = #Tracking.ExAdID# AND Public='Yes'
    ORDER BY Date DESC, Time DESC
    </CFQUERY>

    bfinelsen Guest

  2. Similar Questions and Discussions

    1. something wrong..
      I want to integrate following php-file into my Flash-movie, but something still does not work. The Php-file is like that: Online it looks like...
    2. What am I doing wrong?
      > rs.Source="SELECT id From User Where upper I asked this before... Try sql = "SELECT id FROM user WHERE UPPER(cLoginID) = '" & vUserID &...
    3. What is wrong?
      Take a look at your Stored Procedure. It takes a wide variety of data types. But in your code, you use an overloaded version of the Add() method of...
    4. What am I doing wrong
      I am trying to fade in an image over time, however the image keeps blinking, it fades in all the time. Below is my script. on exitFrame me go to...
    5. What am I doing wrong with this SP??
      Gives me a NULL value at this line. and I know it has a 1 myShippingDetails.theShippingType = CStr(parametertheShippingType.Value) Public...
  3. #2

    Default Re: What am I doing wrong???!?!

    I believe Date and Time are reserved words.
    jdeline Guest

  4. #3

    Default Re: What am I doing wrong???!?!

    Awesome, you are so right, I actually made this change in the database a while
    ago, but forgot to update the code with the changed column names, so thank you
    for sparking my memory. I have been having a rough day. :)

    bfinelsen Guest

Posting Permissions

  • You may not post new threads
  • You may 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