Sounds like you do not want TRY/CATCH... that is triggered on a failure.
You really want to use CFSWITCH/CFCASE.


-- 

John McKown
President, Delaware.Net
ICQ: 1812513
We host Fusebox.org and all of our apps are Fusebox/ColdFusion/BlueDragon 
compliant.



John Lucania wrote:

>I have two queries:
>
><cfquery name="checksrv" datasource="master">
>SELECT @@SERVICENAME;
></cfquery>
>
><cfquery name="checkage" datasource="master">
>SELECT count (program_name)
>FROM master.dbo.sysprocesses
>WITH (NOLOCK)
>WHERE program_name LIKE '%Agent%'
></cfquery>
>
>I want to be notified through cfmail if
>
>1)
>query checksrv doesn't return "MSSQLSERVER"
>         then,  "MSSQLSERVER not returned" in cfmail
>or
>query checkage doesn't return 2
>         then, "Agent not returned 2" in cfmail
>or
>both of checksrv and checkage  don't return
>         then, "MSSQLSERVER not returned and Agent not returned 2" in cfmail
>or
>
>2)
>query checksrv cannot be run
>         then, "MSSQLSERVER Not Avail" in cfmail
>or
>query checkage cannot be run
>         then, "Agent Not Avail" in cfmail
>or
>both of checksrv and checkage cannot be run
>         then, "MSSQLSERVER Not Avail and Agent Not Avail" in cfmail.
>
>Any ideas?
>
>tia,
>
>jl
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231703
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to