Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Registration Page

    Hi all,
    Im doing a registration page for site visitors but I cant connect the
    registration page and the databse. I have a primary key in the registration
    table which is an auto number. Could that be a problem? Attached is the code,
    please help.

    Thanks,
    Grace

    ASP connection code:
    <% @LANGUAGE = VBScript%>
    <HTML>
    <HEAD>
    <TITLE>Database Connection</TITLE>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1"></HEAD>

    <BODY>
    <%
    Dim objConn, strConn, regStatement

    Set objConn= Server.CreateObject("ADODB.Connection")
    strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data
    Source=C:\web\pelahet.mdb;"


    objConn.Open strConn

    regStatement="INSERT INTO Customers ('" & Request("CompanyName") & "','" &
    Request("Title") & "','" & Request("FirstName") & "','" & Request("LastName") &
    "','" & Request("CustomerEmail") & "','" & Request("BillingAddress1") & "','" &
    Request("BillingAddress2") & "','" & Request("BillingCity") & "','" &
    Request("BillingCounty") & "','" & Request("BillingPostalCode") & "','" &
    Request("BillingCountry") & "','" & Request("Phone") & "','" & Request("Fax") &
    "','" & Request("SameDelivery") & "', '"& Request("DeliveryAddress1") & "', '"
    & Request("DeliveryAddress2") & "', '"& Request("ShipCity") & "', '"&
    Request("ShipCounty") & "', '"& Request("ShipPostalCode") & "', '"&
    Request("ShipCountry") & "', '"& Request("Password") & "', '"&
    Request("Confirm") & "')"

    objConn.Execute regStatement


    objConn.close


    Set objRS = Nothing

    Response.Redirect("/RegResult.asp")
    %>
    </BODY>

    </HTML>

    Registion file

    mbwete Guest

  2. Similar Questions and Discussions

    1. Creating a Login / Registration Page
      Can someone please direct me to an article, website or any other data which will help me with this topic: I have a family website and my wife...
    2. code for basic registration to secure page
      hello there I know that this already exists, I just need to find the snippet or formated codes and where they are located. thanks
    3. PHP/MySQL Registration Page
      I have created a registration page that checks for a unique username before submitting the users info. If a username is found an error it thrown,...
    4. Registration page into database
      Hi all, Im doing a registration page for site visitors but I cant connect the registration page and the databse. I have a primary key in the...
    5. Forms autentication and registration page - some advices
      Hi, I implement forms authentication in my application. So I have a login form. Actually I have two custom Web controls, one to login and one to...
  3. #2

    Default Re: Registration Page

    The autonumber primary key is a very common occurance, and so this should
    not be the problem. Are you getting any specific errors?

    --
    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]

    "mbwete" <webforumsuser@macromedia.com> wrote in message
    news:d30v87$dcv$1@forums.macromedia.com...
    > Hi all,
    > Im doing a registration page for site visitors but I cant connect the
    > registration page and the databse. I have a primary key in the
    registration
    > table which is an auto number. Could that be a problem? Attached is the
    code,
    > please help.
    >
    > Thanks,
    > Grace
    >
    > ASP connection code:
    > <% @LANGUAGE = VBScript%>
    > <HTML>
    > <HEAD>
    > <TITLE>Database Connection</TITLE>
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1"></HEAD>
    >
    > <BODY>
    > <%
    > Dim objConn, strConn, regStatement
    >
    > Set objConn= Server.CreateObject("ADODB.Connection")
    > strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data
    > Source=C:\web\pelahet.mdb;"
    >
    >
    > objConn.Open strConn
    >
    > regStatement="INSERT INTO Customers ('" & Request("CompanyName") & "','"
    &
    > Request("Title") & "','" & Request("FirstName") & "','" &
    Request("LastName") &
    > "','" & Request("CustomerEmail") & "','" & Request("BillingAddress1") &
    "','" &
    > Request("BillingAddress2") & "','" & Request("BillingCity") & "','" &
    > Request("BillingCounty") & "','" & Request("BillingPostalCode") & "','" &
    > Request("BillingCountry") & "','" & Request("Phone") & "','" &
    Request("Fax") &
    > "','" & Request("SameDelivery") & "', '"& Request("DeliveryAddress1") &
    "', '"
    > & Request("DeliveryAddress2") & "', '"& Request("ShipCity") & "', '"&
    > Request("ShipCounty") & "', '"& Request("ShipPostalCode") & "', '"&
    > Request("ShipCountry") & "', '"& Request("Password") & "', '"&
    > Request("Confirm") & "')"
    >
    > objConn.Execute regStatement
    >
    >
    > objConn.close
    >
    >
    > Set objRS = Nothing
    >
    > Response.Redirect("/RegResult.asp")
    > %>
    > </BODY>
    >
    > </HTML>
    >
    > Registion file
    >

    Paul Whitham TMM Guest

  4. #3

    Default Re: Registration Page

    Yes, the error says
    Error Type:
    Microsoft JET Database Engine (0x80040E14)
    Syntax error in INSERT INTO statement

    I have checked my insert statement , tried to correct it to no avail.
    Please help.

    Thanks,
    Grace

    mbwete Guest

  5. #4

    Default Re: Registration Page

    Check two things

    1) you have not used any reserved words (such as name, desc, date, password)
    in naming your fields.
    2) you are not trying to insert a string value into a numeric field. The
    most common problem is $ signs or commas in number fields.

    --
    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]

    "mbwete" <webforumsuser@macromedia.com> wrote in message
    news:d32s8t$593$1@forums.macromedia.com...
    > Yes, the error says
    > Error Type:
    > Microsoft JET Database Engine (0x80040E14)
    > Syntax error in INSERT INTO statement
    >
    > I have checked my insert statement , tried to correct it to no avail.
    > Please help.
    >
    > Thanks,
    > Grace
    >

    Paul Whitham TMM 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