Mark:

CFTRY/CFCATCH is definitely the way to go here.  Something like:

        <CFLOOP ... >
                <CFTRY>
                        <CFQUERY ... >
                        </CFQUERY>

                        <CFCATCH EXCEPTION="Database">
                                <!--- Do nothing --->
                        </CFCATCH>
                </CFTRY>
        </CFLOOP>

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Mark W. Breneman [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 1:03 PM
> To: CF-Talk
> Subject: error handling question
>
>
> I have a loop that is doing a db insert.      From time to time
> the data I am
> inserting will have some invalid data. So, loop will stop.  What I need to
> do is to just skip insert if it can not insert it and keep going with the
> loop.
>
> Can cftry/cfcatch do this?
>
> Mark W. Breneman
> -Macromedia Certified ColdFusion Developer
> -Network / Web Server Administrator
>   Vivid Media
>   [EMAIL PROTECTED]
>   www.vividmedia.com
>   608.270.9770
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to