Answers for "coldfusion get datasource information"

0

coldfusion get datasource information

<cfobject action="CREATE" type="JAVA" class="coldfusion.server.ServiceFactory" name="factory">
<cfset cfdebugger = factory.getDebuggingService()>
<cfset qEvents = cfdebugger.getDebugger().getData()>

<cftry>
    <cfquery dbtype="query" name="cfdebug_qryDSN">
        SELECT DISTINCT DATASOURCE FROM qEvents WHERE type = 'SqlQuery'
    </cfquery>
    <cfcatch type="Any">
        <cfset cfdebug_qryDSN = queryNew('DATASOURCE')>
    </cfcatch>
</cftry>

<cfdump var="#cfdebug_qryDSN#" label="cfdebug_qryDSN">
Posted by: Guest on May-14-2020

Browse Popular Code Answers by Language