I usually query before I insert a record with id constraints.... and po up
an error box.
<cfif QUERYNAME.RECORDCOUNT GT 0>
<script language="JavaScript">
alert("Sorry That id is already in use. Please choose another id.");
self.location='javascript:history.back()';
</script>
<cfabort>
</cfif>
At 02:29 PM 9/28/2000 -0400, you wrote:
>I have an Oracle database that had columns that set to allow only one of
>each ID number. What's the best way to produce a custom error message that
>tells the user that the ID they're attempting to enter is alreay in the
>database, instead of the ugly CF/Oracle unique constraint error message.
>CFTRY/CFCATCH alone won't signal the unique constraint problem.
>
>Thanks,
>Dave
>
>
>
>=================================
>"What we need is a list of specific unknown problems we will encounter"
>
>David Hannum
>Web Analyst/Programmer
>Ohio University
>[EMAIL PROTECTED]
>(740) 597-2524
>
>
>
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.