CFTRY and CFCATCH

2005-10-10 Thread Mickael
Hi All,

I have never really had a good handle on CFTRY and CFCATCH.  If I have 
an error on my website as follows


  The request has exceeded the allowable time limit Tag: CFQUERY


What type of cfcatch is that?  Or can that not be caught by CFCatch?

Mike




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220525
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


cftry and cfcatch

2006-02-07 Thread John Lucania
I have two queries:


SELECT @@SERVICENAME;



SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'


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:231628
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFTRY and CFCATCH

2005-10-10 Thread Dawson, Michael
Try CFDUMP on the CFCATCH structure.  That should show you the type of
the exception.


  
  ...SQL...
  

  

  


I would say, in this case, it is probably a database exception.

M!ke

-Original Message-
From: Mickael [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 7:21 AM
To: CF-Talk
Subject: CFTRY and CFCATCH

Hi All,

I have never really had a good handle on CFTRY and CFCATCH.  If I have
an error on my website as follows


  The request has exceeded the allowable time limit Tag: CFQUERY


What type of cfcatch is that?  Or can that not be caught by CFCatch?

Mike

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220537
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


RE: cftry and cfcatch

2006-02-08 Thread PINE Phyo Z
I'm guessing here but I think your two queries are using stored
procedures. So, use cfstoredproc to check the return values. Then, your
first issue will be resolved. Then use nested cftry and cfcatch for each
stored proc to resolve the second issue.

So probably something like this:

 





 

SELECT @@SERVICENAME;



 






 

 

 

SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'



 







 

 

 



 

  
 


 

 

  






HTH,

Pine

-Original Message-
From: John Lucania [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 07, 2006 6:00 PM
To: CF-Talk
Subject: cftry and cfcatch


I have two queries:


SELECT @@SERVICENAME;



SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'


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:231649
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


RE: cftry and cfcatch

2006-02-08 Thread PINE Phyo Z
I was in a hurry when I typed the previous response and found a glitch
in the logic. In the inner cfcatch blocks, I am throwing the errors. So,
whenever there is a problem, the "yourOwnError" exception will be
thrown. That means you will never see " Send "MSSQLSERVER Not Avail and
Agent Not Avail" in cfmail." 

To resolve that, at the top of my head, just remove the  tags
in the cfcatch blocks. Handle it outside the cftry and cfcatch. I don't
think you would even need to nest the cftry anymore. So, the revised
version will be like this:





 

SELECT @@SERVICENAME;



 




 

 

 

SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'



 





 

 




 

  
 


 

 






-Original Message-
From: PINE Phyo Z 
Sent: Wednesday, February 08, 2006 8:53 AM
To: 'cf-talk@houseoffusion.com'
Subject: RE: cftry and cfcatch


I'm guessing here but I think your two queries are using stored
procedures. So, use cfstoredproc to check the return values. Then, your
first issue will be resolved. Then use nested cftry and cfcatch for each
stored proc to resolve the second issue.

So probably something like this:

 





 

SELECT @@SERVICENAME;



 






 

 

 

SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'



 







 

 

 



 

  
 


 

 

  






HTH,

Pine

-Original Message-
From: John Lucania [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 07, 2006 6:00 PM
To: CF-Talk
Subject: cftry and cfcatch


I have two queries:


SELECT @@SERVICENAME;



SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'


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:231658
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cftry and cfcatch

2006-02-08 Thread John McKown
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:
>
>
>SELECT @@SERVICENAME;
>
>
>
>SELECT count (program_name)
>FROM master.dbo.sysprocesses
>WITH (NOLOCK)
>WHERE program_name LIKE '%Agent%'
>
>
>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


Re: cftry and cfcatch

2006-02-25 Thread John Lucania
Thank you so much, Pine et al.
It works wonderful.

jl

On 2/8/06, John McKown <[EMAIL PROTECTED]> wrote:
> 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:
> >
> >
> >SELECT @@SERVICENAME;
> >
> >
> >
> >SELECT count (program_name)
> >FROM master.dbo.sysprocesses
> >WITH (NOLOCK)
> >WHERE program_name LIKE '%Agent%'
> >
> >
> >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:233475
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


basic CFSET, CFTRY and CFCATCH probs.

2004-02-23 Thread Stuart Kidd
Hi,

I've a problem with CFSET, i'm trying to have a font color change in one of my statements but it doesn't seem to work.  The CFSET is within a CFCATCH and CFTRY.


">
Number of Bedrooms must have a value.">
">			
">		

My  tags in my variable work but when i inserted the  tag it hit some errors.  Is this normal?

thanks,

Stuart
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: basic CFSET, CFTRY and CFCATCH probs.

2004-02-23 Thread Greg Luce
Stuart,
	It's the double quotes on the color attribute in your font tags
that's ending the set value too soon. Just leave out the quotes and try.

Greg

-Original Message-
From: Stuart Kidd [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 23, 2004 11:59 AM
To: CF-Talk
Subject: basic CFSET, CFTRY and CFCATCH probs.

Hi,

I've a problem with CFSET, i'm trying to have a font color change in one
of my statements but it doesn't seem to work.  The CFSET is within a
CFCATCH and CFTRY.

 
form.PropertyDataCountry is "">
"Country must have a value."> 
form.PropertyDataNumberofBedrooms is "">
MessageAlert & "Number of Bedrooms must have a
value.">

MessageAlert & "Number of Bathrooms must have a value.">


MessageAlert & "Type of House must have a value.">

My  tags in my variable work but when i inserted the  tag it
hit some errors.  Is this normal?

thanks,

Stuart
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: basic CFSET, CFTRY and CFCATCH probs.

2004-02-23 Thread Stuart Kidd
Thanks Greg, that's done it... just made them single ones.

-- Original Message --
From: "Greg Luce" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 23 Feb 2004 12:04:44 -0500

>Stuart,
>	It's the double quotes on the color attribute in your font tags
>that's ending the set value too soon. Just leave out the quotes and try.
>
>Greg
>
>-Original Message-
>From: Stuart Kidd [mailto:[EMAIL PROTECTED] 
>Sent: Monday, February 23, 2004 11:59 AM
>To: CF-Talk
>Subject: basic CFSET, CFTRY and CFCATCH probs.
>
>
>Hi,
>
>I've a problem with CFSET, i'm trying to have a font color change in one
>of my statements but it doesn't seem to work.  The CFSET is within a
>CFCATCH and CFTRY.
>
> 
>form.PropertyDataCountry is "">
>"Country must have a value."> 
>form.PropertyDataNumberofBedrooms is "">
>MessageAlert & "Number of Bedrooms must have a
>value.">
>
>MessageAlert & "Number of Bathrooms must have a value.">
>
>
>MessageAlert & "Type of House must have a value.">
>
>
>My  tags in my variable work but when i inserted the  tag it
>hit some errors.  Is this normal?
>
>thanks,
>
>Stuart 
>
> 
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: basic CFSET, CFTRY and CFCATCH probs.

2004-02-23 Thread J E VanOver
FYI Stuart, you can also use a PAIR of double quotes in a CF string to
represent a quote.

In your case:
Number of
Bedrooms must have a value.">

Jevo
-Original Message-
From: Stuart Kidd [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 9:12 AM
To: CF-Talk
Subject: RE: basic CFSET, CFTRY and CFCATCH probs.

Thanks Greg, that's done it... just made them single ones.

-- Original Message --
From: "Greg Luce" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 23 Feb 2004 12:04:44 -0500

>Stuart,
> It's the double quotes on the color attribute in your font tags
>that's ending the set value too soon. Just leave out the quotes and try.
>
>Greg
>
>-Original Message-
>From: Stuart Kidd [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 23, 2004 11:59 AM
>To: CF-Talk
>Subject: basic CFSET, CFTRY and CFCATCH probs.
>
>
>Hi,
>
>I've a problem with CFSET, i'm trying to have a font color change in one
>of my statements but it doesn't seem to work.  The CFSET is within a
>CFCATCH and CFTRY.
>
> 
>form.PropertyDataCountry is "">
>"Country must have a value."> 
>form.PropertyDataNumberofBedrooms is "">
>MessageAlert & "Number of Bedrooms must have a
>value.">
>
>MessageAlert & "Number of Bathrooms must have a value.">
>
>
>MessageAlert & "Type of House must have a value.">
>
>
>My  tags in my variable work but when i inserted the  tag it
>hit some errors.  Is this normal?
>
>thanks,
>
>Stuart
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: basic CFSET, CFTRY and CFCATCH probs.

2004-02-23 Thread Stuart Kidd
Thanks for that Jevo! :-)

 
-Original Message-
From: J E VanOver [mailto:[EMAIL PROTECTED] 
Sent: 23 February 2004 18:03
To: CF-Talk
Subject: RE: basic CFSET, CFTRY and CFCATCH probs.

 
FYI Stuart, you can also use a PAIR of double quotes in a CF string to
represent a quote.

In your case:
Number of
Bedrooms must have a value.">

Jevo
-Original Message-
From: Stuart Kidd [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 9:12 AM
To: CF-Talk
Subject: RE: basic CFSET, CFTRY and CFCATCH probs.

Thanks Greg, that's done it... just made them single ones.

-- Original Message --
From: "Greg Luce" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 23 Feb 2004 12:04:44 -0500

>Stuart,
> It's the double quotes on the color attribute in your font tags
>that's ending the set value too soon. Just leave out the quotes and
try.
>
>Greg
>
>-Original Message-
>From: Stuart Kidd [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 23, 2004 11:59 AM
>To: CF-Talk
>Subject: basic CFSET, CFTRY and CFCATCH probs.
>
>
>Hi,
>
>I've a problem with CFSET, i'm trying to have a font color change in
one
>of my statements but it doesn't seem to work.  The CFSET is within a
>CFCATCH and CFTRY.
>
> 
>form.PropertyDataCountry is "">
>"Country must have a value."> 
>form.PropertyDataNumberofBedrooms is "">
>MessageAlert & "Number of Bedrooms must have a
>value.">
>
>MessageAlert & "Number of Bathrooms must have a value.">
>
>
>MessageAlert & "Type of House must have a value.">
>
>
>My  tags in my variable work but when i inserted the  tag it
>hit some errors.  Is this normal?
>
>thanks,
>
>Stuart
>
>
>
>
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]