|
elvanace -> RE: trying to update access db record from frontpage form (5/9/2008 10:35:34)
|
Here's the code for the form where the change is entered: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>lastname</title> </head> <body> <p> </p> <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,lastname,firstname,phone,email,Remote_computer_name,User_name,Browser_type,Timestamp" s-columntypes="3,202,202,202,202,202,202,202,135" s-dataconnection="aspsample" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice="lastname" s-menuvalue="lastname" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="7" b-makeform="FALSE" s-recordsource="Results" s-displaycolumns="lastname,firstname,phone,email,ID" s-criteria s-order s-sql="SELECT * FROM Results" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="1" botid="1" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" startspan --><!--#include file="../_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="SELECT * FROM Results" fp_sDefault="" fp_sNoRecords="No records returned." fp_sDataConn="aspsample" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=1 fp_fTableFormat=False fp_fMenuFormat=False fp_sMenuChoice="lastname" fp_sMenuValue="lastname" fp_sColTypes="&ID=3&lastname=202&firstname=202&phone=202&email=202&Remote_computer_name=202&User_name=202&Browser_type=202&Timestamp=135&" fp_iDisplayCols=5 fp_fCustomQuery=False BOTID=1 fp_iRegion=BOTID %> <!--#include file="../_fpclass/fpdbrgn1.inc"--> <!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="50" --><form METHOD="POST" action="update.asp"> <!--webbot bot="PurpleText" preview="Set this form's properties so it submits user input to the appropriate page." --><table BORDER="0"> <tr> <td><b>lastname:</b></td> <td> <input TYPE="TEXT" NAME="lastname" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"lastname")%>"></td> </tr> <tr> <td><b>firstname:</b></td> <td> <input TYPE="TEXT" NAME="firstname" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"firstname")%>"></td> </tr> <tr> <td><b>phone:</b></td> <td> <input TYPE="TEXT" NAME="phone" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"phone")%>"></td> </tr> <tr> <td><b>email:</b></td> <td> <input TYPE="TEXT" NAME="email" SIZE="40" VALUE="<%=FP_FieldHTML(fp_rs,"email")%>"></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td COLSPAN="2"><br> <input TYPE="Submit" NAME="fp_submit"><input TYPE="Reset" NAME="fp_reset"></td> </tr> </table> <input type="hidden" name="ID" value="ID"> </form> <hr> <!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="1" clientside tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD VALIGN=MIDDLE><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/1]</NOBR><BR></td></tr></table>" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"--> <!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="56926" --></body></html> Code for the page that is supposed to make the change to the db: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <p> </p> <table width="100%" border="1"> <thead> </thead> </table> <table width="100%" border="1"> <thead> </thead> <tbody> <!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="aspsample" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE Results<br>SET Firstname='::firstname::'<br>,Lastname='::lastname::'<br>,Phone='::phone::',<br>Email='::email::'<br>WHERE ID= ::ID::" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="firstname= &lastname= &phone= &email= &ID=1" s-norecordsfound="No records returned." i-maxrecords="1" i-groupsize="0" botid="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="TRUE" startspan --><!--#include file="../_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="UPDATE Results SET Firstname='::firstname::' ,Lastname='::lastname::' ,Phone='::phone::', Email='::email::' WHERE ID= ::ID::" fp_sDefault="firstname= &lastname= &phone= &email= &ID=1" fp_sNoRecords="<tr><td colspan=16 align=""LEFT"" width=""100%"">No records returned.</td></tr>" fp_sDataConn="aspsample" fp_iMaxRecords=1 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&" fp_iDisplayCols=16 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %> <!--#include file="../_fpclass/fpdbrgn1.inc"--> <!--webbot bot="DatabaseRegionStart" endspan i-checksum="17986" --><!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" startspan --><!--#include file="../_fpclass/fpdbrgn2.inc"--> <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="56926" --></tbody> </table> <table width="100%" border="1"> <tbody> </tbody> </table> </body> </html> I'll be grateful for any help you can give me.
|
|
|
|