Problem solved, but it sure does not speed up the code.
snippet
------------------------------
<CFREGISTRY ACTION="GETALL"
BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\NetWebApps\#HOSTNAME#\DataSources"
NAME="MyDataSource"
TYPE="String">
<CFSET MyList = "">
<CFLOOP QUERY="MyDataSource">
<CFSET MyList = #ListAppend(MyList,MyDataSource.entry,",")#>
</CFLOOP>
<CFIF ListContains(MyList,GLOBALDS,",")>
<CFSET isMyDataSource = "YES">
<CFELSE>
<CFSET isMyDataSource = "NO">
</CFIF>
-----------------------------
----- Original Message -----
From: "Bryan LaPlante" <[EMAIL PROTECTED]>
To: "[KCFusion List] (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, December 27, 2000 11:40 AM
Subject: [KCFusion] Help I'm threading the noose
> Can someone look at the code below and make a suggestion.
>
> The first query result comes from the data sources found in the ODBC
entries
> in the registry.
> The second call to CFREGISTRY is used to see if a matching entry has been
> made under the clients data sources in my program.
> Here's the problem with the code snippet below. Once the second call to
> cfregistry creates the MyDataSource variable, it persists to the end of
the
> loop, in other words it will return every data source on the server
whether
> it belongs to the client or not. I have tried to using an incrementing
> variable to make the variable name unique every time with no better
results.
> If I can get this step figured out I can do some other security checking
> before displaying the table and still manage to keep the code fairly
simple.
>
> Snippet
> ------------------------------------
> <!--- Get ODBC Data Sources --->
> <CFREGISTRY ACTION=GETALL NAME="DS_List" TYPE="ANY"
> BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data
Sources">
>
> <!--- Loop through the ODBC data sources --->
> <CFOUTPUT Query="DS_List">
>
> <!-- Convert entry to a string varaible to feed the next cfregistry
> call --->
> <CFSET GLOBALDS = "#DS_List.Entry#">
>
> <!-- Re initialize the isMyDataSource variable so it does not get
stuck
> in the "yes" position --->
> <CFSET isMyDataSource = "NO">
>
> <!--- Verify this is one of my datasources --->
> <CFTRY>
> <CFREGISTRY ACTION="GET"
>
> BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\NetWebApps\#HOSTNAME#\DataSources"
> ENTRY="#GLOBALDS#"
> VARIABLE="MyDataSource"
> TYPE="String">
> <CFIF IsDefined("MyDataSource")>
> <CFSET isMyDataSource = "YES">
> <CFELSE>
> <CFSET isMyDataSource = "NO">
> </CFIF>
>
> <!--- Any error would suggest no match was found --->
> <CFCATCH TYPE="Any">
> <CFSET isMyDataSource = "NO">
> </CFCATCH>
> </CFTRY>
>
> <!--- do more security checking and display table row --->
> <CFIF #isMyDataSource# IS "YES">
> <tr>
> <td>Name</td>
> <td>Description</td>
> </tr>
> </CFIF>
> </CFOUTPUT>
> -------------------------------------------------
>
> Bryan LaPlante
> 816-347-8220
> [EMAIL PROTECTED]
> http://www.netwebapps.com
> Web Development
>
>
>
> ______________________________________________________________________
> The KCFusion.org list and website is hosted by Humankind Systems, Inc.
> List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
> Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
> To Subscribe.................... mailto:[EMAIL PROTECTED]
> To Unsubscribe................ mailto:[EMAIL PROTECTED]
>
>
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]