Not updating Access DB
From: Heather (anonymous_at_discussions.microsoft.com)
Date: 06/25/04
- Next message: Kristen Wagner: "Re: Login Failed Error: Frontpage 2000 to SQL Server 2000"
- Previous message: Kevin Spencer: "Re: Login Failed Error: Frontpage 2000 to SQL Server 2000"
- Next in thread: Heather: "Not updating Access DB"
- Reply: Heather: "Not updating Access DB"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 08:30:41 -0700
I cannot figure out why my form isn't updating my Access
database. The form comes up and works as I think it
should. I click the submit button and I get the
confirmation page. YEAH - right. Wrong. Absolutely
nothing (ever) gets sent to the database. I pretty much
used Frontpages set up and I've checked my database
connection and my fields. I called the ISP to make sure
the database had the correct rights. But I still can't
write. Here's the form code - hopefully someone can help
me. THANKS!!
<%
' FP_ASP ASP Automatically generated by a Frontpage
Component. Do not Edit.
On Error Resume Next
strErrorUrl = ""
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear
Set fp_conn = Server.CreateObject
("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create
connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record
set"
fp_conn.Open Application("Signup_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"
fp_rs.Open "Results", fp_conn, 1, 3, 2 '
adOpenKeySet, adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"
fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record
set to the database"
Dim arFormFields0(14)
Dim arFormDBFields0(14)
Dim arFormValues0(14)
arFormFields0(0) = "gender"
arFormDBFields0(0) = "gender"
arFormValues0(0) = Request("gender")
arFormFields0(1) = "Password"
arFormDBFields0(1) = "Password"
arFormValues0(1) = Request("Password")
arFormFields0(2) = "firstname"
arFormDBFields0(2) = "firstname"
arFormValues0(2) = Request("firstname")
arFormFields0(3) = "Model"
arFormDBFields0(3) = "Model"
arFormValues0(3) = Request("Model")
arFormFields0(4) = "lastname"
arFormDBFields0(4) = "lastname"
arFormValues0(4) = Request("lastname")
arFormFields0(5) = "email"
arFormDBFields0(5) = "email"
arFormValues0(5) = Request("email")
arFormFields0(6) = "Purchased"
arFormDBFields0(6) = "Purchased"
arFormValues0(6) = Request("Purchased")
arFormFields0(7) = "style"
arFormDBFields0(7) = "style"
arFormValues0(7) = Request("style")
arFormFields0(8) = "Username"
arFormDBFields0(8) = "Username"
arFormValues0(8) = Request("Username")
arFormFields0(9) = "Age"
arFormDBFields0(9) = "Age"
arFormValues0(9) = Request("Age")
arFormFields0(10) = "Date"
arFormDBFields0(10) = "Date"
arFormValues0(10) = Request("Date")
arFormFields0(11) = "year"
arFormDBFields0(11) = "year"
arFormValues0(11) = Request("year")
arFormFields0(12) = "make"
arFormDBFields0(12) = "make"
arFormValues0(12) = Request("make")
arFormFields0(13) = "PasswordVerify"
arFormDBFields0(13) = "PasswordVerify"
arFormValues0(13) = Request("PasswordVerify")
FP_SaveFormFields fp_rs, arFormFields0,
arFormDBFields0
If Request.ServerVariables("REMOTE_HOST") <> ""
Then
FP_SaveFieldToDB fp_rs,
Request.ServerVariables
("REMOTE_HOST"), "Remote_computer_name"
End If
If Request.ServerVariables("HTTP_USER_AGENT")
<> "" Then
FP_SaveFieldToDB fp_rs,
Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> ""
Then
FP_SaveFieldToDB fp_rs,
Request.ServerVariables("REMOTE_USER"), "User_name"
End If
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the
database"
fp_rs.Close
fp_conn.Close
Session("FP_SavedFields")=arFormFields0
Session("FP_SavedValues")=arFormValues0
Response.Redirect "signupconfirm.htm"
End If
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Sign Up</title>
</head>
<body bgcolor="#000000" text="#FFFFFF">
<p align="center"><img border="0"
src="images/hpclubheader.JPG"></p>
<p align="center"><font face="Arial Narrow">You can
automatically register
yourself to be a user of the High Performance Club by
filling out and submitting
this form. Only registered users are allowed into the High
Performance Club
Website. </font></p>
<hr>
<form action="--WEBBOT-SELF--" method="POST">
<!--webbot bot="SaveDatabase" startspan
SuggestedExt="asp"
U-ASP-Include-Url="_fpclass/fpdbform.inc" S-
DataConnection="Signup"
S-RecordSource="Results" U-Database-URL="fpdb/Signup.mdb"
U-Confirmation-Url="signupconfirm.htm"
S-Builtin-Fields="REMOTE_HOST HTTP_USER_AGENT Timestamp
REMOTE_USER"
S-Builtin-DBFields="Remote_computer_name Browser_type
Timestamp User_name"
S-Form-Fields="gender Password firstname Model lastname
email Purchased style Username Age Date year make
PasswordVerify"
S-Form-DBFields="gender Password firstname Model
lastname email Purchased style Username Age Date year make
PasswordVerify" --><input TYPE="hidden" NAME="VTI-GROUP"
VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--
webbot
bot="SaveDatabase" endspan -->
<div align="left">
<table border="0" width="100%">
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">First Name</font></td>
<td width="64%"><input type="text"
name="firstname" size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Last Name</font></td>
<td width="64%"><input type="text" name="lastname"
size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Age</font></td>
<td width="64%"><select size="1" name="Age">
<option>18</option>
<option>19</option>
<option>20</option>
</select></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Gender</font></td>
<td width="64%"><select size="1" name="gender">
<option>M</option>
<option>F</option>
</select></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">E-mail Address</font></td>
<td width="64%"><input type="text" name="email"
size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Year of Vehicle</font></td>
<td width="64%"><select size="1" name="year">
<option>1990</option>
<option>1991</option>
</select></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Make of Vehicle</font></td>
<td width="64%"><input type="text" name="make"
size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Model of Vehicle</font></td>
<td width="64%"><input type="text" name="Model"
size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Style of Wheels</font></td>
<td width="64%"><select size="1" name="style">
<option>RPF1</option>
<option>ZR1</option>
</select></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Where Purchased</font></td>
<td width="64%"><input type="text"
name="Purchased" size="30"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Date of Purchase
(mm/dd/yy)</font></td>
<td width="64%"><input type="text" name="Date"
size="8"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Username</font></td>
<td width="64%"><input type="text" size="25"
maxlength="256" name="Username"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Password</font></td>
<td width="64%"><input type="password" size="25"
maxlength="256" name="Password"></td>
</tr>
<tr>
<td width="36%" align="right"><font face="Arial
Narrow">Confirm Password</font></td>
<td width="64%"><input type="password" size="25"
maxlength="256" name="PasswordVerify"></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2">
<hr>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">In
order for your membership to be validated, you must
submit a copy of the
receipt for your High Performance wheel purchase
to:</font></p>
<p align="center" style="margin-top: 0; margin-bottom:
0"> </p>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">Enkei
International, Inc.</font></p>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">Attn:
High Performance Club</font></p>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">4900
Alliance Gateway</font></p>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">Fort
Worth, TX 76177</font></p>
<p align="center" style="margin-top: 0; margin-bottom:
0"> </p>
<p align="center" style="margin-top: 0; margin-bottom:
0"><font face="Arial Narrow">If
you do not submit this receipt within 30 days your
membership will cease until
your purchase can be verified.</font></p>
</td>
</tr>
</table>
</div>
<h2 align="center"><input type="submit" value="Register
Me"> <input type="reset" value="Clear Form"></h2>
</form>
<p align="center"><font face="Arial Narrow">By signing up
I agree to the
<a href="terms.htm" style="text-decoration:
underline; font-family: Arial Narrow; color: #FFFFFF">Terms
& Conditions</a> of this Membership</font>
</p>
</body>
</html>
- Next message: Kristen Wagner: "Re: Login Failed Error: Frontpage 2000 to SQL Server 2000"
- Previous message: Kevin Spencer: "Re: Login Failed Error: Frontpage 2000 to SQL Server 2000"
- Next in thread: Heather: "Not updating Access DB"
- Reply: Heather: "Not updating Access DB"
- Messages sorted by: [ date ] [ thread ]