diff --git a/admin/install.php b/tmp/new.install.php
old mode 100644
new mode 100755
index bc8d613..3bd5a94
--- a/admin/install.php
+++ b/tmp/new.install.php
@@ -292,28 +292,25 @@ if( 2 == $t_install_state ) {
 	</td>
 	<?php
 		$t_db_open = false;
-	$g_db = ADONewConnection( $f_db_type );
-	$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password );
-
-	if( $t_result ) {
+		$g_db = ADONewConnection( $f_db_type );
 
 		# check if db exists for the admin
 		$t_result = @$g_db->Connect( $f_hostname, $f_admin_username, $f_admin_password, $f_database_name );
-		if( $t_result ) {
+		if( !$t_result ) {
+			print_test_result( BAD, true, 'Does administrative user have access to the database? ( ' . db_error_msg() . ' )' );
+		} else {
 			$t_db_open = true;
 			$f_db_exists = true;
-		}
-		if( $f_db_type == 'db2' ) {
-			$result = &$g_db->execute( 'set schema ' . $f_db_schema );
-			if( $result === false ) {
-				print_test_result( BAD, true, 'set schema failed: ' . $g_db->errorMsg() );
+		
+			if( $f_db_type == 'db2' ) {
+				$result = &$g_db->execute( 'set schema ' . $f_db_schema );
+				if( $result === false ) {
+					print_test_result( BAD, true, 'set schema failed: ' . $g_db->errorMsg() );
+				}
+			} else {
+				print_test_result( GOOD );
 			}
-		} else {
-			print_test_result( GOOD );
 		}
-	} else {
-		print_test_result( BAD, true, 'Does administrative user have access to the database? ( ' . db_error_msg() . ' )' );
-	}
 	?>
 </tr>
 <?php
