logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-29-2008, 04:48 AM   #1
Jemini
 
Join Date: Aug 2008
Posts: 5
Default Syntax error help!

Im getting this syntax error in my browser. im tring to make a signup page to add new members into my database. the error is saying: Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/signup.asp, line 174

here is a link to the page where the error is at: http://72.249.5.64/$sitepreview/rgli...com/signup.asp


i have a similar one elsewhere that works perfectly. what can the problem be? everything is spelled correctly. anything would help

Last edited by Jemini; 08-29-2008 at 04:58 AM..
Jemini is offline   Reply With Quote
Old 08-29-2008, 07:11 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,170
Default

Code:
Syntax error in INSERT INTO statement. 
/signup.asp, line 174
what does it say?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 08-29-2008, 09:02 AM   #3
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

we need to see the code before we can help
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 08-29-2008, 11:40 PM   #4
Jemini
 
Join Date: Aug 2008
Posts: 5
Default

Sorry, here is the source code:

HTML Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/RGListings2.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/ASP.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>RG Listings - New Account</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style5 {
    font-size: 18px;
    font-style: italic;
}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
@import url("css/border.css");
.style2 {    font-size: 10px;
    font-style: italic;
}
.style3 {font-weight: bold; font-size: 30px;}
body,td,th {
    font-family: Tahoma;
    font-size: 12px;
    color: #FFFFFF;
}
body {
    background-color: #303030;
    margin-left: 100px;
    margin-top: 50px;
    margin-right: 100px;
}
a:link {
    color: cccccc;
    text-decoration: underline;
}
a:visited {
    text-decoration: underline;
    color: 999999;
}
a:hover {
    text-decoration: none;
}
a:active {
    text-decoration: underline;
}
.style4 {font-size: 10px}
-->
</style>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="Border">
  <tr>
    <td><div align="center" class="style3">RG Listings</div></td>
  </tr>
  <tr>
    <td><div align="center"><!-- InstanceBeginEditable name="TopLinks" -->List | WTB | Browse | Log In | <strong>Sign Up</strong><!-- InstanceEndEditable --></div></td>
  </tr>
</table>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!-- InstanceBeginEditable name="Body" -->
      <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form_signup" id="form_signup">
        <table width="500" border="0" align="center" cellpadding="0" cellspacing="2" class="Border">
          <tr>
            <td colspan="2"><div align="center" class="style5">Create New Account</div></td>
          </tr>
          <tr>
            <td width="137">Create Username:</td>
            <td width="361"><label>
              <input name="username" type="text" id="username" size="50">
            </label></td>
          </tr>
          <tr>
            <td>Password:</td>
            <td><label>
              <input name="password" type="text" id="password" size="50">
            </label></td>
          </tr>
          <tr>
            <td>City:</td>
            <td><label>
            <input type="text" name="city" id="city">
            </label></td>
          </tr>
          <tr>
            <td>E-mail:</td>
            <td><label>
              <input name="email" type="text" id="email" size="50">
            </label></td>
          </tr>
          <tr>
            <td>Challenge Question:</td>
            <td><label>
              <input name="challengeq" type="text" id="challengeq" size="50">
            </label></td>
          </tr>
          <tr>
            <td>Answer:</td>
            <td><label>
              <input name="challengea" type="text" id="challengea" size="50">
            </label></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><label>
              <input type="submit" name="button" id="button" value="Sign Up">
            </label></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      
        

        

        <input type="hidden" name="MM_insert" value="form_signup">
</form>
      <p>&nbsp;</p>
      <!-- InstanceEndEditable --></td>
  </tr>
</table>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="Border">
  <tr>
    <td><div align="center"><!-- InstanceBeginEditable name="BottomLinks" --><a href="about.html">About</a> | <a href="contact.html">Contact</a><!-- InstanceEndEditable --></div></td>
  </tr>
  <tr>
    <td><div align="center" class="style2"> 2008 RG Listings</div></td>
  </tr>
</table>

</body>
<!-- InstanceEnd --></html>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form_signup") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_RGListings2_STRING
    MM_editCmd.CommandText = "INSERT INTO Members (Username, Password, City, Email, ChallengeQ, ChallengeA) VALUES (?, ?, ?, ?, ?, ?)" 
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Request.Form("username")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 255, Request.Form("password")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 255, Request.Form("city")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 255, Request.Form("email")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 255, Request.Form("challengeq")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 255, Request.Form("challengea")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "signupty.html"
    If (Request.QueryString <> "") Then
      If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
        MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
      Else
        MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
      End If
    End If
    Response.Redirect(MM_editRedirectUrl)
  End If
End If
%>
<%
Dim rs_signup
Dim rs_signup_cmd
Dim rs_signup_numRows

Set rs_signup_cmd = Server.CreateObject ("ADODB.Command")
rs_signup_cmd.ActiveConnection = MM_RGListings2_STRING
rs_signup_cmd.CommandText = "SELECT ChallengeA, ChallengeQ, City, Email, Password, Username FROM Members" 
rs_signup_cmd.Prepared = true

Set rs_signup = rs_signup_cmd.Execute
rs_signup_numRows = 0
%>
<%
rs_signup.Close()
Set rs_signup = Nothing
%>
on the page, the line that said had the error is the one that says "MM_editCmd.Execute". Any ideas on what the problem is?
Jemini is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com