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,
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,