Index: tags/security/ui/dmSec_TestSecuritySetup.cfm
===================================================================
RCS file: /FARCRY/farcry_core/tags/security/ui/dmSec_TestSecuritySetup.cfm,v
retrieving revision 1.2
diff -u -r1.2 dmSec_TestSecuritySetup.cfm
--- tags/security/ui/dmSec_TestSecuritySetup.cfm	23 Apr 2004 17:50:15 -0000	1.2
+++ tags/security/ui/dmSec_TestSecuritySetup.cfm	16 Jun 2004 18:53:59 -0000
@@ -57,25 +57,40 @@
 		
 			<cfif not isDefined("stUd.#udName#.datasource")>
 		
-				<span style="color:red;">Error:</span> UserDirectory '#udName#' datasource attribute not found.<br>
-				
-			<cfelseif not isDefined("stUd.#udName#.dbowner")>
-			
-				<span style="color:red;">Error:</span> UserDirectory '#udName#' dbowner attribute not found.<br>
-				
-			<cfelseif not isDefined("stUd.#udName#.testTable")>
-			
-				<span style="color:red;">Error:</span> UserDirectory '#udName#' testTable attribute not found.<br>				
+				<span style="color:red;">Error:</span> UserDirectory '#udName#' Datasource attribute not found.<br>
 			
 			<cfelse>
 			
 				<span style="color:green;">OK:</span> UserDirectory Datasource attribute exists.<br>
 				
-				<!--- Test the database connection works --->
-				<cfquery name="testConnection" datasource="#stUd[udName].datasource#">
-					SELECT 1
-					FROM #stUd[udName].dbowner##stUd[udName].testTable#
-				</cfquery>
+				<!--- Test the odbc connection works --->
+				<cftry>
+				
+					<cfswitch expression="#application.dbType#">
+					
+						<cfcase value="ora">
+							<cfquery name="testODBC" datasource="#stUd[udName].datasource#" dbtype="ODBC">
+								SELECT 1 FROM DUAL
+							</cfquery>
+						</cfcase>
+						
+						<cfdefaultcase>
+							<cfquery name="testODBC" datasource="#stUd[udName].datasource#" dbtype="ODBC">
+								SELECT 1;
+							</cfquery>
+						</cfdefaultcase>
+					
+					</cfswitch>
+					
+				<cfcatch>
+					<cfrethrow>
+					<!---
+					<span style="color:red;">Error:</span> Cannot find datasource #stUd[udName].datasource# in ODBC
+					--->
+					<cfabort>
+				</cfcatch>
+				
+				</cftry>
 				
 				<span style="color:green;">OK:</span> UserDirectory Datasource '#stUd[udName].datasource#' connection success.<br>
 				<a href="?tag=CreateSecurityTables&userDirectory=#udName#" onClick="return confirm('Are you sure you wish to recreate you security tables?');">Create Security Tables</a><br>
