> Does anybody know a way to trap a sql statement so that it can be
> caught in
> a try/catch block?
>
> Is this supposed to be done when you select "show sql and datasource name"
> in the debug settings of CF Admin?  It's not working for us, we
> only get the
> datasource name but no sql.

A standard Try/Catch routine will stop errors for normal queries... what did
you want to do exactly?

I'd use;
<cftry>
        <cfquery name="myQuery" datasource="myDSN">
                select myFields
                from myTable
                where myField=#myValue#
        </cfquery>
        <cfcatch>
        ... do the catch routine ...
        </cfcatch>
</cftry>

Then again, if you know your datasources, why would you get an error from a
simple select?

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to