Try wrapping the code in a cftry with a cfcatch to report any errors that
happen. As long as the code is in the cftry block, the processing will
continue.
HTH, Matt

<cftry>
        <cfoutput query="q_Server">
                <cfhttp method="Post" url="#Trim(ServerURL)#/UpdateDB.cfm" 
timeout="10">
                        <cfhttpparam name="FirstName" value="ABC" type="FORMFIELD">
                </cfhttp>
        </cfoutput>
</cftry>
<cfcatch type="any">[*not sure what type you're dealing with]
        <CFOUTPUT>
                <cfmail
                to="your email"
                from="app"
                subject="ERROR REPORT">
                        ATTN: ERROR WHILE UPDATING DATA
                        MSG:#CFCATCH.Message#
                        TYPE:#CFCATCH.Type#
                        DETAIL:#CFCATCH.DETAIL#

                <cfmail>
        </CFOUTPUT>
</cfcatch>
-----Original Message-----
From: Rudy Rustam [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 23, 2000 6:51 PM
To: CF-Talk
Subject: OT: CFHTTP - continue on broken url


Scenario:
I have a few servers in different location.
When the new record is added to Master (Central) Database. My code should
automatically update the rest of the server in different locations.

Code:
<cfoutput query="q_Server">
        <cfhttp method="Post" url="#Trim(ServerURL)#/UpdateDB.cfm"
timeout="10">
                <cfhttpparam name="FirstName" value="ABC" type="FORMFIELD">
        </cfhttp>
</cfoutput>

Problem:
When there is an invalid Server's URL, the cfhttp will return error message
and stop executing.

Expected:
I need CFHTTP to continue executing until end of records, and returns the
list of invalid Server's URL.


Your idea are most welcome.


Thanks in advance.

- Rudy
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to