From: "Deva Ramesh" <[EMAIL PROTECTED]>
> Hai all
>
> Can i know what data base(whether Sqlserver or Ms Access) is using the
> programmer with help of just datasource name.
> Is there any Command is available in coldfusion.
>
> any ideas would be appreciated.
>
>
Maybe this will help you ... requires access to cfregistry tag and OS
== Windows. You can use this to just ouput a list of dsn or use it to
build a db callable by query.
<cfset thisBranch=
"HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\DataSources">
<CFREGISTRY ACTION="GetAll"
BRANCH=#thisBranch#
TYPE="ANY"
NAME="dsREG">
<cfoutput><b>#thisBranch#</b><br></cfoutput>
<cfoutput query="dsREG">
#dsREG.Entry# #dsREG.Type# #dsREG.Value#<br>
</cfoutput>
<cfloop query="dsREG">
<cfif dsREG.TYPE[CurrentRow] IS NOT "KEY">
<cfelse>
<cfset nowBranch=thisBranch & "\" & dsREG.Entry[CurrentRow]>
<cfoutput><b>#nowBranch#</b><br></cfoutput>
<CFREGISTRY ACTION="GetAll"
BRANCH=#nowBranch#
TYPE="ANY"
NAME="nowREG">
<cfoutput query="nowREG">
#nowREG.Entry# #nowREG.TYPE# #nowREG.Value#<br>
</cfoutput>
</cfif>
</cfloop>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.