CFLib.org – Common Function Library Project

GetDSNs()

Last updated November 15, 2002
Download UDF

author

Raymond Camden                                    Raymond Camden

Version: 1 | Requires: ColdFusion MX | Library: DatabaseLib

Description:
Gets a list of registered datasources.

Return Values:
Returns an array.

Example:

<!---
Commented out for security reasons.
<cfdump var="#getDSNs()#">
--->

Parameters:

No arguments.

Full UDF Source:

<cfscript>
/**
* Gets a list of DSNs.
*
* @return Returns an array.
* @author Raymond Camden (ray@camdenfamily.com)
* @version 1, November 15, 2002
*/

function getDSNs() {
    var factory = createObject("java","coldfusion.server.ServiceFactory");
    return factory.getDataSourceService().getNames();
}
</cfscript>

Search CFLib.org


Latest Additions

Jose Diaz-Salcedo Jose Diaz-Salcedo added
cfRssFeed
2 day(s) ago

Raymond Compton Raymond Compton added
structBlend
23 day(s) ago

Duncan Duncan added
IsZIPUK
23 day(s) ago

Todd Sharp Todd Sharp added
getTagContentAll
29 day(s) ago

Gerald Guido Gerald Guido added
ListReturnDuplicat...
1 month(s) ago

Created by Raymond Camden / Design by Justin Johnson