Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default page for duplicate values

Status
Not open for further replies.

wouter

Technical User
Jul 3, 2000
45
0
0
NL
Hello,

At this point, when i try to submit data into my database, and they contain duplicate values, i get an CF-error message. You know, it's the big white screen with a lot of text. I would like to create my own error-message, so the users know what the error-message is about. The white screen can be a little confusing for non-technical user. Does anyone know how i can make this work?

Wouter [sig][/sig]
 
You could use cftry/cfcatch like:
Code:
<CFTRY>
<CFQUERY NAME=&quot;MyQRY&quot; DATASOURCE=&quot;MyDSN&quot;>
*insert query that might go wrong*
</CFQUERY>
<CFCATCH TYPE=&quot;database&quot;>
*insert error handling*
</CFCATCH>
</CFTRY>

In the cfcatch tag you can redirect users to a general error-message or you could use the cfcatch variables to direct them to a more specific error message. Read the cfdocs on cftry/cfcatch for more information on cfcatch variables.

Hope this helps,

Brommrrrrr [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top