|
| |
|
|
danielfunk
Posts: 6 From: hawthorne, ca usa Status: offline
|
update using fp2000 - 5/21/2001 23:49:00
i've read through various threads, especially the one starting 2/23 re jjhill's update issue. i can't seem to get my update to work. i have a asp file called edit.asp, which displays a form whose fields are populated by a particular database record. you can edit the information in the form fields and then submit the form to another asp file called update.asp. this results in teh below error. the update.asp contains a drw w/the below code. i believe the error rests in the edited fields in the edit.asp form not being carried over to the update.asp, but i'm not sure. any help you can provide is appreciated. regards update distinctrow proddb set name='::name::',notes='::notes::',notes2='::notes2::',photo2=': hoto2::' where proddb.id=::id:: Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'proddb.id='. Number: -2147217900 (0x80040E14) Source: Microsoft OLE DB Provider for ODBC Drivers
One or more form fields were empty. You should provide default values for all form fields that are used in the query.
|
|
|
|
khiser0001
Posts: 162 From: None Status: offline
|
RE: update using fp2000 - 5/21/2001 14:17:00
You can do it the way that you are (I would try dropping the "prodID" in the where proddb.id=::id:: statement is. (Not sure if that is your problem)BUT I would reccomend learning how to use ASP wizard. It will write the code for updating, deleteing, adding records etc. What I do then is go in and learn the code and make edits so that it looks the way I want it to. This tool has save me hours. (I even donated for the use of it  If you have questions let me know. The website is http://www.aspwizard.co.uk Hope this helps, Kevin
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: update using fp2000 - 5/21/2001 16:39:00
When you load a record in edit.asp, what are you doing with the ID value?It needs to be stored in a hidden form field as well. This way, the ID is passed to the update page. I assume at the moment, it isnt  ------------------ §þððk¥ "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
danielfunk
Posts: 6 From: hawthorne, ca usa Status: offline
|
RE: update using fp2000 - 5/21/2001 17:42:00
thank you for your reply.no i am not using hidden fields. here is what i'm using to populate the form field. <%= FP_FieldVal(fp_rs, "Photo2")%> i looked into hidden field function. how would you set up the name/value pair so the edited information in the field gets carried over to the update? regards
|
|
|
|
Bnugent
Posts: 257 From: Tampa Florida Tampa, FL USA Status: offline
|
RE: update using fp2000 - 5/21/2001 18:02:00
Spooky is correct. Someone had the same problem a while back. They were trying to update on the ID value which is a good idea, problem being that it wasnt being passed to the update page. Thus, errors instead of update. If need be, pass as a hidden value.------------------ Brian---
|
|
|
|
danielfunk
Posts: 6 From: hawthorne, ca usa Status: offline
|
RE: update using fp2000 - 5/21/2001 18:17:00
spooky,i reread your response and was above to figure out the hidden field. now another problem has come up. it seems this is a server side issue. here is the error. Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. Number: -2147467259 (0x80004005) Source: Microsoft OLE DB Provider for ODBC Drivers any idea what could be causing this on the server? regards
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: update using fp2000 - 5/21/2001 22:28:00
Now that one is permissions, there isnt read / write permissions for the database.Firstly, try importing the database to your site via FP2000 with the site open live. 9/10 doing this will set up the correct permsiions for you (instead of ftp) the other 1/10 you will need to cintact your host to set up r/w permissions for the database folder. ------------------ §þððk¥ "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
danielfunk
Posts: 6 From: hawthorne, ca usa Status: offline
|
RE: update using fp2000 - 5/22/2001 13:37:00
spooky,thanks for your help. we changed the system dsn to a direction connection, and the update now takes place. the problem is that the update code (given previously) changes every record in that table to what is in the form. why would it do that? daniel
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: update using fp2000 - 5/22/2001 16:49:00
Can you copy the SQL? I am assuming that perhaps the ID is not still being passed or is named incorrectly.
|
|
|
|
danielfunk
Posts: 6 From: hawthorne, ca usa Status: offline
|
RE: update using fp2000 - 5/22/2001 18:13:00
i hope i didn't mis-understand you. here is the text of the product_update.asp.is there a way to display the variables on used in the drw on the page, that way one could see the variables being passed from the calling page? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>New Page 1</title> </head> <body> <p>update distinctrow<br> proddb<br> set<br> name='::name::',notes='::notes::',notes2='::notes2::',photo2=': hoto2::'<br> where proddb.id=::id::<br> </p> <table width="100%" border="1" height="94"> <thead> </thead> <tbody> <!--webbot bot="DatabaseRegionStart" startspan s-columnnames s-columntypes s-dataconnection="IMI-WEB" 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 <br>proddb<br>set<br>name='::name::',notes='::notes::',notes2='::notes2::',photo2=': hoto2::'<br>where id=::id::<br>" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="name=&notes=&notes2=&photo2=&id=" s-NoRecordsFound="No records returned." i-MaxRecords="256" i-GroupSize="5" BOTID="0" u-dblib="../_fpclass/fpdblib.inc" u-dbrgn1="../_fpclass/fpdbrgn1.inc" u-dbrgn2="../_fpclass/fpdbrgn2.inc" tag="TBODY" local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">Database Results regions will not preview unless this page is fetched from a Web server with a web browser. The following table row will repeat once for every record returned by the query.</font></td></tr>" 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>" b-WasTableFormat="TRUE" --><!--#include file="../_fpclass/fpdblib.inc"--> <% fp_sQry="update proddb set name='::name::',notes='::notes::',notes2='::notes2::',photo2=': hoto2::' where id=::id:: " fp_sDefault="name=¬es=¬es2=&photo2=&id=" fp_sNoRecords="<tr><td colspan=16 align=left width=""100%"">No records returned.</td></tr>" fp_sDataConn="IMI-WEB" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=5 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" i-CheckSum="65415" endspan --> <!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" local_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><FORM><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR></FORM></td></tr>" 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/5]</NOBR><BR></td></tr>" --><!--#include file="../_fpclass/fpdbrgn2.inc"--> <!--webbot bot="DatabaseRegionEnd" i-CheckSum="56926" endspan --> </tbody> </table> </body> </html>
|
|
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
|
|
|