CFMX 6.1/Access 2002 Date/Time Errors on INSERTStatement

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

  1. #1

    Default CFMX 6.1/Access 2002 Date/Time Errors on INSERTStatement

    The attached code gives me the following error:

    Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
    statement.

    I have tried numerous things including formatting the date/time, but I
    continually get this error message. I am not sure if it is specific to the
    date/time issue, but I am extremely stumped at this point. Any help would be
    appreciated.



    Code:


    <cfquery name="CSDSurveyCMSubmit" datasource="hd0_csd">
    INSERT INTO FollowUp (
    Comment,
    FollowBy,
    Ticket,
    Date,
    Complete
    )

    VALUES (
    '#Comment#',
    '#Name#',
    '#TicketNo#',
    '#CreateODBCDateTime(now())#',
    '1'
    );
    </cfquery>

    MazTaim Guest

  2. Similar Questions and Discussions

    1. errors with the date/time button
      yeah, the date button thinks that its 1970....I find that a little bit odd...anybody know how to fix this? ~Jordan Lambrecht (www.jordysworld.tk)
    2. Date/Time format with MS Access & CF
      Does anyone know of any workarounds regarding date/time format between MS Access and ColdFusion? Right now I have to set a column in my Access...
    3. MS Access time and date problem
      As the topic summary says, I am having trouble inserting both time and dates into a MS Access database. My database has three fields, eventdate,...
    4. Access Date Time Query
      I am having some trouble with a query for Date Time in Access. I assume it is because the Access formatted date is Date/Time with stored data that...
    5. Access 2000 / 2002 errors - urgent
      Hi there, I tried to open the access 2000 mdb(migrated from access 97) in access 2002 on XP. the forms are running. the forms have entry fields...
  3. #2

    Default Re: CFMX 6.1/Access 2002 Date/Time Errors on INSERTStatement

    Two initial problems

    1) "Date" is a reserved word and should not be used as a column name. Change
    the column name to something else
    2) Don't use single quotes around the #CreateODBCDateTime()# function.

    Though I *think* #now()# and #CreateODBCDateTime()# return the same value.

    mxstu Guest

  4. #3

    Default Re: CFMX 6.1/Access 2002 Date/Time Errors on INSERTStatement

    Ooops! What I meant was, I think #now()# returns the date/time in the same format as #CreateODBCDateTime()#

    {ts '2005-08-01 08:42:34'}
    mxstu Guest

  5. #4

    Default Re: CFMX 6.1/Access 2002 Date/Time Errors on INSERTStatement

    That worked. Thank you for the help.
    MazTaim 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