Unexplained ColdFusion Error Plz Help!!

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

  1. #1

    Default Unexplained ColdFusion Error Plz Help!!

    I keep getting the following error each time I attempt to add a recordset to a
    database using an insertion form created in Dreamweaver, this is for a very
    important company project and I have tried everything that I know of to fix the
    problem with no luck, if someone out there cold please help me and tell me what
    is going on I would appericate that very much, what follows is a copy of the
    error I am getting and the code of the site I am working on, Thank you in
    advance for your kind help.

    This is Error I keep getting when I submit the form on my site:

    "<Error Occurred While Processing Request

    Error Executing Database Query.
    Syntax error in INSERT INTO statement.



    Please try the following:
    ? Enable Robust Exception Information to provide greater detail about the
    source of errors. In the Administrator, click Debugging & Logging > Debugging
    Settings, and select the Robust Exception Information option.
    ? 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.1; AT&T CSM7.0; SV1;
    ..NET CLR 1.0.3705)
    Remote Address 127.0.0.1
    Referrer [url]http://localhost:8500/dynamic/XBOX%20Slave.cfm?recordID=9[/url]
    Date/Time 25-Sep-05 10:21 PM>"




    And this is the Code of the site from Dreamweaver:

    <cfparam name="URL.ID" default="1">
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
    <cfquery datasource="sitedrive">
    INSERT INTO INPUTSITE (SELECT, FIRSTNAME, LASTNAME, BADDRESS, BCITY,
    BSTATE, BZIPCODE, EMAIL, BPHONE, SHIPFIRSTNAME, SHIPLASTNAME, SHIPADDRESS,
    SHIPCITY, SHIPSTATE, SHIPZIP, CCARD, MM, YYYY, CVVNUM, TYPE)
    VALUES (
    <cfif IsDefined("FORM.SELECT") AND #FORM.SELECT# NEQ "">
    '#FORM.SELECT#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.FIRSTNAME") AND #FORM.FIRSTNAME# NEQ "">
    '#FORM.FIRSTNAME#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.LASTNAME") AND #FORM.LASTNAME# NEQ "">
    '#FORM.LASTNAME#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.BADDRESS") AND #FORM.BADDRESS# NEQ "">
    '#FORM.BADDRESS#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.BCITY") AND #FORM.BCITY# NEQ "">
    '#FORM.BCITY#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.BSTATE") AND #FORM.BSTATE# NEQ "">
    '#FORM.BSTATE#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.BZIPCODE") AND #FORM.BZIPCODE# NEQ "">
    '#FORM.BZIPCODE#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.EMAIL") AND #FORM.EMAIL# NEQ "">
    '#FORM.EMAIL#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.BPHONE") AND #FORM.BPHONE# NEQ "">
    '#FORM.BPHONE#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPFIRSTNAME") AND #FORM.SHIPFIRSTNAME# NEQ "">
    '#FORM.SHIPFIRSTNAME#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPLASTNAME") AND #FORM.SHIPLASTNAME# NEQ "">
    '#FORM.SHIPLASTNAME#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPADDRESS") AND #FORM.SHIPADDRESS# NEQ "">
    '#FORM.SHIPADDRESS#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPCITY") AND #FORM.SHIPCITY# NEQ "">
    '#FORM.SHIPCITY#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPSTATE") AND #FORM.SHIPSTATE# NEQ "">
    '#FORM.SHIPSTATE#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.SHIPZIP") AND #FORM.SHIPZIP# NEQ "">
    '#FORM.SHIPZIP#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.CCARD") AND #FORM.CCARD# NEQ "">
    '#FORM.CCARD#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.MM") AND #FORM.MM# NEQ "">
    '#FORM.MM#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.YYYY") AND #FORM.YYYY# NEQ "">
    '#FORM.YYYY#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.CVVNUM") AND #FORM.CVVNUM# NEQ "">
    '#FORM.CVVNUM#'
    <cfelse>
    NULL
    </cfif>
    ,
    <cfif IsDefined("FORM.TYPE") AND #FORM.TYPE# NEQ "">
    '#FORM.TYPE#'
    <cfelse>
    NULL
    </cfif>
    )
    </cfquery>
    <cflocation url="Thanks.html">
    </cfif>
    <cfquery name="Recordset2" datasource="sitedrive">
    SELECT *
    FROM XBOX
    WHERE ID = #URL.ID#
    </cfquery>
    <cfquery name="Recordset1" datasource="sitedrive">
    SELECT *
    FROM XBOX
    WHERE ID = #URL.recordID#
    </cfquery>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Thank You For Your Purchase!!!</title>
    </head>

    <body>
    <table border="0" align="center">
    <cfoutput>
    <tr>
    <td width="74">ItemName:</td>
    <td width="153">#Recordset1.ItemName#</td>
    </tr>
    <tr>
    <td>Platform:</td>
    <td>#Recordset1.Platform#</td>
    </tr>
    <tr>
    <td><div align="center"></div></td>
    <td><div align="center"><img
    src="C:\CFusionMX7\wwwroot\Dynamic\Images\#Records et1.Image#" align="top"
    /></div></td>
    </tr>
    <tr>
    <td>Category:</td>
    <td>#Recordset1.Category#</td>
    </tr>
    <tr>
    <td>Price:</td>
    <td>#Recordset1.Price#</td>
    </tr>
    </cfoutput>
    </table>

    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <form method="post" name="form1"
    action="<cfoutput>#CurrentPage#</cfoutput>">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">FIRSTNAME:</td>
    <td><input type="text" name="FIRSTNAME" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">LASTNAME:</td>
    <td><input type="text" name="LASTNAME" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Billing Address</td>
    <td><input type="text" name="BADDRESS" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">CITY:</td>
    <td><input type="text" name="BCITY" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">STATE:</td>
    <td><input type="text" name="BSTATE" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">ZIPCODE:</td>
    <td><input type="text" name="BZIPCODE" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">EMAIL:</td>
    <td><input type="text" name="EMAIL" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Contact PHONE:</td>
    <td><input type="text" name="BPHONE" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Shipping Address (If Different from Above):
    </td>
    <td>&nbsp;</td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">FIRSTNAME:</td>
    <td><input type="text" name="SHIPFIRSTNAME" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">LASTNAME:</td>
    <td><input type="text" name="SHIPLASTNAME" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Shipping ADDRESS:</td>
    <td><input type="text" name="SHIPADDRESS" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">CITY:</td>
    <td><input type="text" name="SHIPCITY" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">STATE:</td>
    <td><input type="text" name="SHIPSTATE" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">ZIP Code:</td>
    <td><input type="text" name="SHIPZIP" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Please Enter Payment Information </td>
    <td>(We Only Accept Visa &amp; Mastercard at this time) </td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Credit Card Number (No Spaces):</td>
    <td><input type="text" name="CCARD" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">EXP Month</td>
    <td><input type="text" name="MM" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">EXP Year</td>
    <td><input type="text" name="YYYY" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">CVV Value (3-Digit number on back of your
    Card):</td>
    <td><input type="text" name="CVVNUM" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">Comments or Special Instructions: </td>
    <td><textarea name="TYPE" cols="30" rows="10"></textarea></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">&nbsp;</td>
    <td><input type="submit" value="Submit">
    <label>
    <input name="Clear" type="reset" id="Clear" value="Reset" />
    </label></td>
    </tr>
    </table>
    <input type="hidden" name="SELECT"
    value="<cfoutput>#Recordset1.ItemName#</cfoutput>">
    <input type="hidden" name="MM_InsertRecord" value="form1">
    </form>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <p>&nbsp;</p>
    </body>
    </html>

    joeman77 Guest

  2. Similar Questions and Discussions

    1. ColdFusion Server 6.1 error
      I just installed the server and tried to log in but it gave me an error. I am not able to even see the log in page. Can somebody help me trouble...
    2. CFWDDX error---coldfusion 4.5
      I have a web based application , which is developed using Coldfusion 4.5 and Oracle as a database. I am getting below error while converting...
    3. Is someone phoning home? Unexplained traffic on dial up
      I am seeing some incoming and outgoing traffic on an idle dial up connection that I cannot pin down. If I dial into my ISP and don't do anything,...
    4. Unexplained Instance Error
      I am getting the following error: " Object reference not set to an instance of an object." The strange thing is that I AM creating a new instance...
    5. Unexplained Performance Nightmare !!! Suggestions/solutions Please!!
      27 Dec 2002 16:36:37 -0800, Dr Deadpan said (and I quote): IIRC, there was something about hints in embedded SQL in PL/SQL? They were ignored...
  3. #2

    Default Re: Unexplained ColdFusion Error Plz Help!!

    If you are using Access, "Type" is a , .... etc)
    mxstu Guest

  4. #3

    Default Re: Unexplained ColdFusion Error Plz Help!!

    SELECT is a reserved word in any database...probably type also (as mxstu
    pointed out)
    --
    Tim Carley
    [url]www.recfusion.com[/url]
    [email]info@NOSPAMINGrecfusion.com[/email]
    Mountain Lover Guest

  5. #4

    Default Re: Unexplained ColdFusion Error Plz Help!!

    >SELECT is a reserved word in any database..

    Yes, that is what meant. That "type" is a reserved word in access (maybe in
    other databse). Key sql words like "select" (update, insert, etc) would be
    reserved in any database. Hence the I comment "I <bold>strongly</bold>
    recommend changing..." that column. Sorry if that wasn't clear :-)

    mxstu Guest

  6. #5

    Default Re: Unexplained ColdFusion Error Plz Help!!

    more likely, us news readers don't see half of those lovely html
    post...and I'm stubborn and don't want all the flash stuff...so it's
    much easier though newsgroups...just that these forums don't show us
    newsgroup users all of the message ;-(

    On 9/28/2005 11:43 AM mxstu intelligently wrote:
    >>SELECT is a reserved word in any database..
    >
    > Yes, that is what meant. That "type" is a reserved word in access (maybe in
    > other databse). Key sql words like "select" (update, insert, etc) would be
    > reserved in any database. Hence the I comment "I <bold>strongly</bold>
    > recommend changing..." that column. Sorry if that wasn't clear :-)
    >
    --
    Tim Carley
    [url]www.recfusion.com[/url]
    [email]info@NOSPAMINGrecfusion.com[/email]
    Mountain Lover Guest

  7. #6

    Default Re: Unexplained ColdFusion Error Plz Help!!

    this is all that came across in the newsgroup message:

    If you are using Access, "Type" is a

    that's it!!!!
    They shouldn't offer the newsgroup option if it doesn't work right!!! RSS
    would be much nicer! ;-)

    Mountain Lover Guest

  8. #7

    Default Re: Unexplained ColdFusion Error Plz Help!!

    Well that's not good at all ;-) I know that "modifications" to posts aren't
    usually visible to NG users, and that extraneous formatting like bold, italics,
    etc doesn't show up. I didn't realize the links got messed up as well. The
    full message was:
    >If you are using Access, "Type" is a reserved word. "Select" is definitely a
    reserved
    >word. Try changing the column names to something else (preferred) or using
    >square brackets around the column in the INSERT statement. I would strongly
    >recommend changing the column named "Select".
    I think the problem is that "reserved word" was a hyperlink to a page on the
    MS site listing reserved words for Access. It must have cut off the rest of the
    text.

    mxstu 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