> I am interested in peoples opinions on the following: > > Is it best practice to check for a records existence > before attempting to update it? And what would the > best way to go about that be?
Depends heavily on the application ... The database as a general rule doesn't care if a given record doesn't exist when you execute an update statement, so if the record doesn't exist, the worst that will happen is nothing -- which may be worse than an error. :) Though I can't think of a single occasion on which I actually manually verified that the row existed prior to updating it... though if you use a stored procedure, you could simply use a select statement following the update statement which would retrieve all the data from the updated row using the same identifying input variable, that way if the result set returned to CF has a recordcount of 0 you know that nothing was updated and maybe you've got a problem. Isaac Dealey Certified Advanced ColdFusion Developer www.turnkey.to 954-776-0046 ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

