Professional Web Applications Themes

about cfinsert tag error! - Coldfusion Database Access

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">...

  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. #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 doentation and
    elsewhere, but I believe this is better:

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




    BKBK Guest

  3. #3

    Default Re: about cfinsert tag error!

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

  4. #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

Similar Threads

  1. cfinsert help
    By jhutchdublin in forum Coldfusion Database Access
    Replies: 3
    Last Post: February 14th, 02:05 PM
  2. cfinsert from javascript
    By sweetyp2005 in forum Coldfusion Database Access
    Replies: 4
    Last Post: October 24th, 05:39 AM
  3. CFInsert
    By Heather939 in forum Macromedia ColdFusion
    Replies: 3
    Last Post: May 14th, 01:00 AM
  4. CFinsert misbehaves
    By H3ath0r in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: February 24th, 06:28 PM
  5. <cfinsert> SQL syntax error?
    By thetawaverider in forum Macromedia ColdFusion
    Replies: 1
    Last Post: February 21st, 06:01 AM

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