Everybody has their own preferred method, but I'd use a couple of cfif statements. First, check to see if they supplied recordID, and if not display an error. Second query the db to see if their recordID exists, and if not display an error. As simple as that. :)
> -----Original Message----- > From: Janet MacKay [mailto:[EMAIL PROTECTED] > Sent: Friday, December 01, 2006 2:31 PM > > What is the proper way to handle validation type errors? > > Lets say I have a page that expects a url parameter named > recordID. It then retrieves the corresponding record from a > database table and displays the information. > > I would like to display an error message if > 1. recordID was not supplied or > 2. no corresponding record was found in the database > > Is there a preferred technique or strategy for handling > validation errors like this? "EMF <idahopower.com>" made the following annotations. ------------------------------------------------------------------------------ This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ============================================================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2288 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
