ENHANCEMENT Added additional error message pass through on the configuration helper for SQL Server

This commit is contained in:
Sean Harvey 2010-03-05 04:24:53 +00:00
parent a37fd93c37
commit 9c4f25b43f

View File

@ -36,13 +36,21 @@ class MSSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
'UID' => $databaseConfig['username'],
'PWD' => $databaseConfig['password']
));
$errors = sqlsrv_errors();
if($errors) {
$error .= "\n";
foreach($errors as $detail) {
$error .= "\n" . @$detail['message'] . "\n";
}
}
}
if($conn) {
$success = true;
} else {
$success = false;
$error = 'SQL Server requires a valid username and password to determine if the server exists.';
if(!$error) $error = 'SQL Server requires a valid username and password to determine if the server exists.';
}
return array(