Professional Web Applications Themes

Problems with INSERT record. What's goin on!? - Dreamweaver AppDev

I'm trying to setup a very basic user registration form. It contains basic user input and uses the insert record behavior to insert the data into a single table in my database. I haven't hand coded a thing here. Simply created the form and then went to the insert record behavior. It matched up everything because I use the same names for my form fields as my database fields. I'm getting the following error, though: Error Type: Microsoft JET Database Engine (0x80040E14) Syntax error in INSERT INTO statement. /kennyshardwood/register.asp, line 115 Line 115 is the MM_editCmd.Execute line. That gets called ...

  1. #1

    Default Problems with INSERT record. What's goin on!?

    I'm trying to setup a very basic user registration form. It contains basic
    user input and uses the insert record behavior to insert the data into a single
    table in my database.

    I haven't hand coded a thing here. Simply created the form and then went to
    the insert record behavior. It matched up everything because I use the same
    names for my form fields as my database fields. I'm getting the following
    error, though:

    Error Type:
    Microsoft JET Database Engine (0x80040E14)
    Syntax error in INSERT INTO statement.
    /kennyshardwood/register.asp, line 115

    Line 115 is the MM_editCmd.Execute line. That gets called above:

    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    Again, this is very basic and was done completely with DW behaviors so I don't
    see how there could be a syntax error for one...and also, where is the error?
    I can't find it.

    I tried using the command method of insert as well (I'm using OLEDB) and I'm
    getting a syntax error on the execute line there as well:

    commInsertReg.Execute()

    Updating and displaying records from the database works beautifully. I've got
    permissions setup correctly...at least the same way I always have which
    includes the IUSR_computername user. Any info on what I need to do here would
    be great. Thanks!



    drewangell Guest

  2. #2

    Default Re: Problems with INSERT record. What's goin on!?

    The error is listed here

    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14465[/url]

    Mostly likely down to reserved words.

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004



    Julian Roberts Guest

  3. #3

    Default Re: Problems with INSERT record. What's goin on!?

    thanks, i'll have to look into this. I don't think i'm using a reserved word...but that's the last thing I can think of. I'll have to look through this whole list of access reserves. thanks!
    drewangell Guest

  4. #4

    Default Re: Problems with INSERT record. What's goin on!?

    Well, I wasn't able to find any fields in my database that were on the list of
    reserved words form that site, however it does mention that there are more than
    what it lists. None of them seem like they would be, but I went ahead and
    renamed them all according to the naming convention it talks about there.

    I've redone the insert record page and now I'm not getting an error, but it's
    simply reloading the same page when I submit it and not inserting anything. It
    doesn't seem to be attaching anything to the URL either...just reloads the page.

    ????

    drewangell Guest

  5. #5

    Default Re: Problems with INSERT record. What's goin on!?

    If your form has

    enctype="multipart/form-data"

    then remove it

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  6. #6

    Default Re: Problems with INSERT record. What's goin on!?

    I don't see that in there.
    drewangell Guest

  7. #7

    Default Re: Problems with INSERT record. What's goin on!?

    <form ACTION="<%=MM_editAction%>" METHOD="POST" name="registration"
    id="registration">
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr>
    <td width="38%"><div align="right"><strong>First Name:
    </strong></div></td>
    <td width="62%"><input name="firstName" type="text" id="firstName"
    size="20" maxlength="25"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Last Name: </strong></div></td>
    <td><input name="lastName" type="text" id="lastName" size="20"
    maxlength="25"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Company:</strong></div></td>
    <td><input name="company" type="text" id="company" size="25"
    maxlength="50"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Billing Address: </strong></div></td>
    <td><input name="billingAddress" type="text" id="billingAddress"
    size="30" maxlength="50"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Billing Address 2: </strong></div></td>
    <td><input name="billingAddress2" type="text" id="billingAddress2"
    size="30" maxlength="50"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>City:</strong></div></td>
    <td><input name="city" type="text" id="city" size="25"
    maxlength="30"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>State:</strong></div></td>
    <td><input name="state" type="text" id="state" size="5"
    maxlength="2"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Postal Code: </strong></div></td>
    <td><input name="postalCode" type="text" id="postalCode" size="8"
    maxlength="10"></td>
    </tr>
    <tr>
    <td><div align="right"><strong>Country:</strong></div></td>
    <td><span class="formField">
    <select name="country" id="country">
    <option selected value="">Choose a Country
    <option value="USA">United States of America
    <option value="CAN">Canada
    <option value="DEU">Germany
    <option value="FRA">France
    <option value="GBR">United Kingdom
    <option value="IND">India
    <option value="">---------------------
    <option value="AFG">Afghanistan
    <option value="ALB">Albania
    <option value="DZA">Algeria
    <option value="ASM">American Samoa
    <option value="AND">Andorra
    <option value="AGO">Angola
    <option value="AIA">Anguilla
    <option value="ATA">Antarctica
    <option value="ATG">Antigua and Barbuda
    <option value="ARG">Argentina
    <option value="ARM">Armenia
    <option value="ABW">Aruba
    <option value="AUS">Australia
    <option value="AUT">Austria
    <option value="AZE">Azerbaijan
    <option value="BHS">Bahamas
    <option value="BHR">Bahrain
    <option value="BGD">Bangladesh
    <option value="BRB">Barbados
    <option value="BLR">Belarus
    <option value="BEL">Belgium
    <option value="BLZ">Belize
    <option value="BEN">Benin
    <option value="BMU">Bermuda
    <option value="BTN">Bhutan
    <option value="BOL">Bolivia
    <option value="BIH">Bosnia and Herzegowina
    <option value="BWA">Botswana
    <option value="BVT">Bouvet Island
    <option value="BRA">Brazil
    <option value="IOT">British Indian Ocean Territory
    <option value="BRN">Brunei Darussalam
    <option value="BGR">Bulgaria
    <option value="BFA">Burkina Faso
    <option value="BDI">Burundi
    <option value="KHM">Cambodia
    <option value="CMR">Cameroon
    <option value="CPV">Cape Verde
    <option value="CYM">Cayman Islands
    <option value="CAF">Central African Republic
    <option value="TCD">Chad
    <option value="CHL">Chile
    <option value="CHN">China
    <option value="CXR">Christmas Island
    <option value="CCK">Cocoa (Keeling) Islands
    <option value="COL">Colombia
    <option value="COM">Comoros
    <option value="COG">Congo
    <option value="COK">Cook Islands
    <option value="CRI">Costa Rica
    <option value="CIV">Cote Divoire
    <option value="HRV">Croatia (local name: Hrvatska)
    <option value="CUB">Cuba
    <option value="CYP">Cyprus
    <option value="CZE">Czech Republic
    <option value="DNK">Denmark
    <option value="DJI">Djibouti
    <option value="DMA">Dominica
    <option value="DOM">Dominican Republic
    <option value="TMP">East Timor
    <option value="ECU">Ecuador
    <option value="EGY">Egypt
    <option value="SLV">El Salvador
    <option value="GNQ">Equatorial Guinea
    <option value="ERI">Eritrea
    <option value="EST">Estonia
    <option value="ETH">Ethiopia
    <option value="FLK">Falkland Islands (Malvinas)
    <option value="FRO">Faroe Islands
    <option value="FJI">Fiji
    <option value="FIN">Finland
    <option value="FXX">France, Metropolitan
    <option value="GUF">French Guiana
    <option value="PYF">French Polynesia
    <option value="ATF">French Southern Territories
    <option value="GAB">Gabon
    <option value="GMB">Gambia
    <option value="GEO">Georgia
    <option value="GHA">Ghana
    <option value="GIB">Gibraltar
    <option value="GRC">Greece
    <option value="GRL">Greenland
    <option value="GRD">Grenada
    <option value="GLP">>Guadeloupe
    <option value="GUM">Guam
    <option value="GTM">Guatemala
    <option value="GIN">Guinea
    <option value="GNB">Guinea-Bissau
    <option value="GUY">Guyana
    <option value="HTI">Haiti
    <option value="HMD">Heard and Mc Donald Islands
    <option value="HND">Honduras
    <option value="HKG">Hong Kong
    <option value="HUN">Hungary
    <option value="ISL">Iceland
    <option value="IDN">Indonesia
    <option value="IRN">Iran (Islamic Republic of)
    <option value="IRQ">Iraq
    <option value="IRL">Ireland
    <option value="ISR">Israel
    <option value="ITA">Italy
    <option value="JAM">Jamaica
    <option value="JPN">Japan
    <option value="JOR">Jordan
    <option value="KAZ">Kazakhstan
    <option value="KEN">Kenya
    <option value="KIR">Kiribati
    <option value="PRK">Korea, Democratic Peoples Republic of
    <option value="KOR">Korea, Republic of
    <option value="KWT">Kuwait
    <option value="KGZ">Kyrgyzstan
    <option value="LAO">Lao Peoples Democratic Republic
    <option value="LVA">Latvia
    <option value="LBN">Lebanon
    <option value="LSO">Lesotho
    <option value="LBR">Liberia
    <option value="LBY">Libyan Arab Jamahiriya
    <option value="LIE">Liechtenstein
    <option value="LTU">Lithuania
    <option value="LUX">Luxembourg
    <option value="MAC">Macau
    <option value="MKD">Macedonia, The Former Yugoslav Republic of
    <option value="MDG">Madagascar
    <option value="MWI">Malawi
    <option value="MYS">Malaysia
    <option value="MDV">Maldives
    <option value="MLI">Mali
    <option value="MLT">Malta
    <option value="MHL">Marshall Islands
    <option value="MTQ">Martinique
    <option value="MRT">Mauritania
    <option value="MVS">Mauritius
    <option value="MYT">Mayotte
    <option value="MEX">Mexico
    <option value="FSM">Micronesia, Federated States of
    <option value="MDA">Moldova, Republic of
    <option value="MCO">Monaco
    <option value="MNG">Mongolia
    <option value="MSR">Montserrat
    <option value="MAR">Morocco
    <option value="MOZ">Mozambique
    <option value="MMR">Myanmar
    <option value="NAM">Namibia
    <option value="NRU">Nauru
    <option value="NPL">Nepal
    <option value="NLD">Netherlands
    <option value="ANT">Netherlands Antilles
    <option value="NCL">New Caledonia
    <option value="NZL">New Zealand
    <option value="NIC">Nicaragua
    <option value="NER">Niger
    <option value="NGA">Nigeria
    <option value="NIU">Niue
    <option value="NFK">Norfolk Island
    <option value="MNP">Northern Mariana Islands
    <option value="MOR">Norway
    <option value="OMN">Oman
    <option value="PAK">Pakistan
    <option value="PLW">Palau
    <option value="PAN">Panama
    <option value="PNG">Papua New Guinea
    <option value="PRY">Paraguay
    <option value="PER">Peru
    <option value="PHL">Philippines
    <option value="PCN">Pitcairn
    <option value="POL">Poland
    <option value="PRT">Portugal
    <option value="PRI">Puerto Rico
    <option value="QAT">Qatar
    <option value="REU">Reunion
    <option va
    drewangell Guest

  8. #8

    Default Re: Problems with INSERT record. What's goin on!?

    Ok, I rebooted and now it works.

    But, now I'm having another problem. :)

    I don't have any of my fields marked as required in Access, however, I'm
    getting the following error on some of my fields:

    Error Type:
    Microsoft JET Database Engine (0x80004005)
    Field 'customers.strFaxNumber' cannot be a zero-length string.
    /kennyshardwood/register.asp, line 115



    drewangell Guest

  9. #9

    Default Re: Problems with INSERT record. What's goin on!?

    Ok Ok...I got greedy and didn't google this one until after I posted...sorry. I found it. thanks for the help!
    drewangell Guest

  10. #10

    Default Re: Problems with INSERT record. What's goin on!?

    You need to set it so that "Allow Zero Length" is set to YES which is
    completely different to Required

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "drewangell" <webforumsusermacromedia.com> wrote in message
    news:d72c6b$91k$1forums.macromedia.com...
    > Ok, I rebooted and now it works.
    >
    > But, now I'm having another problem. :)
    >
    > I don't have any of my fields marked as required in Access, however, I'm
    > getting the following error on some of my fields:
    >
    > Error Type:
    > Microsoft JET Database Engine (0x80004005)
    > Field 'customers.strFaxNumber' cannot be a zero-length string.
    > /kennyshardwood/register.asp, line 115
    >
    >
    >

    Paul Whitham TMM Guest

  11. #11

    Default Re: Problems with INSERT record. What's goin on!?

    Yup, I had found it. Thanks for the reply!
    drewangell Guest

Similar Threads

  1. Insert record
    By t.d. in forum Coldfusion - Getting Started
    Replies: 14
    Last Post: July 25th, 02:25 PM
  2. Need Help with Record Insert Error
    By manhattanmediaworks in forum Coldfusion Database Access
    Replies: 18
    Last Post: June 1st, 07:58 PM
  3. Insert Record problems with Stystem.Data
    By InvisibleBunnyKing in forum Dreamweaver AppDev
    Replies: 2
    Last Post: May 2nd, 02:33 PM
  4. How to insert a new record
    By European in forum ASP.NET Building Controls
    Replies: 0
    Last Post: December 1st, 03:39 AM
  5. insert a record
    By Tom in forum ASP Database
    Replies: 7
    Last Post: June 3rd, 05:05 PM

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