Ok, you really got me curious on this one. I googled, and found an old CF dev journal article (http://pdf.sys-con.com/ColdFusion/beyond.pdf) with this function. It doesn't use the admin API, but the service factory. Now keep in mind anything in the service factory is undocumented and therefore technically unsupported by Adobe if you use it in your code.
It also kicks butt in my opinion. Here is a good resource on it: http://spike.oli.tudelft.nl/jochemd/index.cfm?PageID=10 This function works for me to verify datasources: <!--- verify a datasource is working ---> <cffunction name="verifydsn" returntype="boolean"> <cfargument name="dsn" type="string" required="yes"> <!--- init local variables ---> <cfset var dsservice=""> <cfset var result="true"> <!--- try/catch block ---> <cftry> <!--- get "factory" ---> <cfobject action="create" type="java" class="coldfusion.server.ServiceFactory" name="factory"> <!--- get datasource service ---> <cfset dsService=factory.getDataSourceService()> <!--- validate dsn ---> <cfset result=dsService.verifyDatasource(dsn)> <!--- if any error, return false ---> <cfcatch type="any"> <cfset result="false"> </cfcatch> </cftry> <cfreturn result> </cffunction> ~Brad -----Original Message----- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Thursday, April 19, 2007 11:52 AM To: CF-Talk Subject: RE: Testing Database Connection within Application Here is a stack trace of what CF is doing when it verifies a data source from CF ADMIN. Unfortunately these files are encrypted, so there is no (Legal) way to find out how the code looks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

