|
| |
|
|
kmc
Posts: 108 Joined: 3/8/2002 From: Status: offline
|
update database form - 3/25/2002 15:26:52
I have a form that I use to add new records to my access db in fp. I also want to use the same form to update any changes in the records that I have already added. How do I go about doing this.
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: update database form - 3/26/2002 0:49:38
You would be best to seperate the 2, it would be easier populating the form with a record, via the DRW for updates, and then using a form only to add records. The opposite is true for pure asp, Id use the same form. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
kmc
Posts: 108 Joined: 3/8/2002 From: Status: offline
|
RE: update database form - 3/26/2002 9:32:55
I am getting an error when I try this on the server, the error says that there is a datatype mismatch. This is my code for my updateform.asp: <form method="POST" action="updateobit.asp" name="updateobitform"> <p>ID <input type="text" name="ID" size="20"> </p> <p>Obituary<br> <textarea rows="10" name="Obituary" cols="50"></textarea></p> <p>Current? <input type="text" name="Current" size="20" value="On"></p> <p><a href="updateobit.asp"><input type="submit" value="Submit" name="Add"></a> <input type="reset" value="Reset" name="B2"></p> </form> This is my code for my updatepage.asp: <!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="Condolences" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE DeceasedList<br>SET Obituary='::Obituary::', Current='::Current::'<br>WHERE ID='::ID::'" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="Obituary=&Current=On&ID=" s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="1" 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" align="left" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" startspan b-WasTableFormat="TRUE" --><!--#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 DeceasedList SET Obituary='::Obituary::', Current='::Current::' WHERE ID='::ID::'" fp_sDefault="Obituary=&Current=On&ID=" fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records returned.</td></tr>" fp_sDataConn="Condolences" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=1 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_iDisplayCols=16 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %> <!--#include file="../../_fpclass/fpdbrgn1.inc"--> <!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="59869" -->
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: update database form - 3/26/2002 20:36:40
When using numeric fields (ID) you do not need the quotes around it. ...Current::' WHERE ID=::ID::" §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
kmc
Posts: 108 Joined: 3/8/2002 From: Status: offline
|
RE: update database form - 3/27/2002 16:36:36
I think that I am getting close, but I still a an error. This is my error: Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'John Doe is dead'. Number: -2147217900 (0x80040E14) Source: Microsoft OLE DB Provider for ODBC Drivers This is my code for my updateform.asp: <p> </p> <form method="POST" action="updateobit.asp" name="updateobitform"> <p>ID <input type="text" name="ID" size="20"> </p> <p>Obituary<br> <textarea rows="10" name="Obituary" cols="50" style="text-align: left; line-height: 100%"></textarea></p> <p>Current <input type="text" name="Current" size="20"></p> <p><a href="updateobit.asp"><input type="submit" value="Submit" name="Add"></a> <input type="reset" value="Reset" name="B2"></p> </form> This is my code for my updatepage.asp: <!--webbot bot="DatabaseRegionStart" s-columnnames s-columntypes s-dataconnection="Condolences" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="FALSE" b-tableexpand="FALSE" b-tableheader="FALSE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource s-displaycolumns s-criteria s-order s-sql="UPDATE DeceasedList SET Obituary=::Obituary::, Current=::Current:: WHERE ID=::ID::<br>" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="Obituary=&Current=&ID=" s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="1" 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" align="left" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" startspan b-WasTableFormat="TRUE" --><!--#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 DeceasedList SET Obituary=::Obituary::, Current=::Current:: WHERE ID=::ID:: " fp_sDefault="Obituary=&Current=&ID=" fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records returned.</td></tr>" fp_sDataConn="Condolences" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=1 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_iDisplayCols=16 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %> <!--#include file="../../_fpclass/fpdbrgn1.inc"--> <!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="60098" --><!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="1" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/1]</NOBR><BR></td></tr>" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"--> <!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="65064" -->
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|