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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop the process if there is error on Coldfusion template 1

Status
Not open for further replies.

771212

Programmer
Oct 1, 2002
7
0
0
US
Does anybody know if there is any tag that prevents the page process if there is an error on the page?

For example, I have couple of cfquery to delete something.

<cfquery name="delete1" datasource="#request.dsn#">
delete from pages
where pageid = #form.pageid#
</cfquery>

<cfquery name="delete2" datasource="#request.dsn#">
Delete from into pageattachment
where pageid = #form.pageid#
</cfquery>

You will notice, I have a wrong “into” syntax on the second query, that will cause some problem, but when the coldfusion catch the problem, the first query is already prosecuted, is there any way to stop the process if all any query is wrong. Something like “cflock” to surround the whole action page to make sure everything is right, but I know cflock is not for this.

Thanks,
 
yes!
I think this is the one I want, thank u!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top