about cfinsert tag error!

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

  1. #1

    Default about cfinsert tag error!

    please look this code:
    <cfif IsDefined("Form.posted")>
    <cfinsert datasource="test" tablename="users"
    formfields="Username,Password,RealName,Email">
    </cfif>
    <form name="addUser" method="post" action="insert.cfm" preservedata="yes">
    Username: <input type="text" name="Username"><br />
    Password: <input type="password" name="Password"><br />
    Real Name: <input type="text" name="RealName"><br />
    Email: <input type="text" name="Email"><br />
    <input type="hidden" name="posted" value="<cfoutput>#Now()#</cfoutput>">
    <input type="submit" name="Submit" value="Add">
    </form>

    Error Executing Database Query.
    INSERT INTO ????????

    The error occurred in D:\cfwwwroot\test\insert.cfm: line 10

    8 : <body>
    9 : <cfif IsDefined("Form.posted")>
    10 : <cfinsert datasource="test" tablename="users"
    formfields="Username,Password,RealName,Email">
    11 : </cfif>
    12 : <form name="addUser" method="post" action="insert.cfm" preservedata="yes">

    Yuanhui9 Guest

  2. Similar Questions and Discussions

    1. cfinsert help
      I would like to have people insert information into a database. It's a single table in a database, so I thought I would try <cfinsert> I'm...
    2. insert using cfinsert
      I have been trying to upgrade my server from CF 5 to CF 7. I have a table as keywords with the attributes as follows: ID int (primary key) keyword...
    3. cfinsert from javascript
      I have write javascript to create form field when button is click. function addEvent(myTable){ var lastRow = myTable.rows.length; var...
    4. CFInsert
      Hi. I was hoping I could get help on an issue. I am using CFInsert to add data from a form into two tables that are related. Table 1: Members...
    5. <cfinsert> SQL syntax error?
      I'm stuck on what should be a simple looping upload, and I'm hoping someone point me in the right direction. Here is what I'm doing: 1) Reading...
  3. #2

    Default Re: about cfinsert tag error!

    Do datasource test and table users actually exist? Does users contain
    columns named Username,Password,RealName and Email?

    A point aside. I know it is written as you have in the documentation and
    elsewhere, but I believe this is better:

    <cfoutput><input type="hidden" name="posted" value="#Now()#"></cfoutput>




    BKBK Guest

  4. #3

    Default Re: about cfinsert tag error!

    i'm change database driver from Microsoft Access with Unicode to Microsoft Access, OK!
    Why?
    Yuanhui9 Guest

  5. #4

    Default Re: about cfinsert tag error!

    Good question. BKBK didn't make the suggestion, so why are you changing
    drivers?

    Going back to your original post, what was the sql generated by Cold Fusion?
    It should have been included in the error message, or did you really get those
    little squares.

    Dan Bracuk 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