[thelist] Web Forms to Access DB?
rudy
r937 at interlog.com
Tue Jan 8 10:08:38 CST 2002
> Using the database constraint method with Cold
> Fusion, are you pretty safe doing a cftry/cfcatch like this?
> <cftry>
> <cfquery>INSERT...</cfquery>
> <cfcatch type="database">
> Sorry, try another username...
> <cfinclude template="form_register.cfm">
> </cfcatch>
> </cftry>
beauty
yes, that should work
worst case scenario, without something to "catch" the database error, the
user will probably see the raw database error -- not always a bad thing,
since it does usually indicate what the problem was (e.g. "unique
constraint on username violated") but probably too shocking for most users
rudy
More information about the thelist
mailing list