<!--- validate the value passed to the query from the url as a numeric value val() or cfqueryparam (action template too) --->
<cfquery name="rs_shotwatch" datasource="Shotwatch"> SELECT * FROM childinfo WHERE childID = #val(url.childID)# </cfquery> <html> <head> <title>Shotwatch Version Beta 1.0</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <cfoutput><!--- open cfoutput ---> <form action="update_shotwatch4.cfm"> <input type="hidden" name="childID" value="#rs_shotwatch.childID#"> <table width="200" height="30" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="100" height="30"> <!--- escape the pund sign to display #1 ---> <div align="left"><strong>Shot ##1</strong></div> </td> <td width="100"> <input value="#dateformat(rs_shotwatch.shot1, "DD-MMM-YY")#" type="text" name="shot1"> </td> </tr> </table> <INPUT type="submit" value="Update"> </form> </cfoutput:> <!--- close cfoutput ---> </body> </html> ----- Original Message ----- From: "Hawkes, Keith A CIV" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, February 20, 2003 1:45 PM Subject: Drivin' Me Nuts! > Here's the input form: > ***************************** > <cfquery name="rs_shotwatch" datasource="Shotwatch"> > SELECT * > FROM childinfo > WHERE childID = #url.childID# > </cfquery> > <html> > <head> > <title>Shotwatch Version Beta 1.0</title> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > </head> > <body> > <cfform action="update_shotwatch4.cfm"> > <input type="hidden" name="childID" value="#rs_shotwatch.childID#"> > <table width="200" height="30" border="0" cellpadding="0" cellspacing="0"> > <tr> > <td width="100" height="30"><div align="left"><strong>Shot > #1</strong></div></td> > <td width="100"> <input value="<cfoutput>#dateformat(rs_shotwatch.shot1, > "DD-MMM-YY")#</cfoutput>" type="text" name="shot1"></td> > </tr> > </table> > > <CFOUTPUT> > <INPUT type="submit" value="Update"> > </CFOUTPUT> > </cfform> > </body> > </html> > ***************************** > Here's the update form: > <html> > <head> > <title>Update Form Code</title> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > </head> > <body> > <cfquery datasource="shotwatch"> > UPDATE childinfo > SET shot1 = '#FORM.shot1#' > WHERE childID=#val(FORM.childID)# > </cfquery> > </body> > </html> > ***************************** > Here's the error message: > Error Executing Database Query. > [Macromedia][SQLServer JDBC Driver][SQLServer]The column prefix > '#rs_shotwatch' does not match with a table name or alias name used in the > query. > > The Error Occurred in > C:\Inetpub\wwwroot\INTRANET\shotwatch\update_shotwatch4.cfm: line 13 > > 11 : </cfquery> > 12 : </body> > 13 : </html> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

