One way : Use <CFTRY> <cfcatch> block around
your Query

Look at the docs for an example

~Justin


----- Original Message -----
From: "Jeremy Toevs" <[EMAIL PROTECTED]>
To: "<" <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2000 4:49 PM
Subject: UserAction.cfm


> When you have a "No Duplicates" field in the database and a duplicate is
entered, CF returns somewhat of a weird error message. How do you get it to
return an error message saying "This UserName is already in use, choose
another." UserName being the "No Duplicates" field. Here is my action cfm:
>
> *********************************************************
>
> <cfquery datasource="DSN" name="AddUser">
> INSERT INTO Users (UserName, RealName, Email)
> VALUES ('#UserName#','#RealName#','#Email#')
> </cfquery>
>
> *********************************************************
>
> Thanks in advance,
>
> Jeremy
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar
>
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to