> There is a decent chance that the admin api functionality gives you
> access to the same thing that happens when you click the "verify data
> source" icon in CF Admin.
Yes, you can get this from the adminapi:
<cfscript>
// you must log in before accessing other adminapi components
adminObj = createObject('component',
'cfide.adminapi.administrator');
adminObj.login('yourCFAdminPassword');
// create the data object and test the DSN
dataObj = createObject('component',
'cfide.adminapi.datasource');
writeOutput(dataObj.verifyDSN('dsnName')); //returns boolean
</cfscript>
I tested shutting down my datasource, and it retured false in about 1-2
seconds in my local environment.
HTH,
Rich Kroll
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275875
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4