ENHANCEMENT Expose errors as they are available with sqlsrv driver in MSSQLDatabaseConfigurationHelper

This commit is contained in:
Sean Harvey 2010-03-05 21:22:54 +00:00
parent 9c4f25b43f
commit 036570e3c1

View File

@ -75,13 +75,20 @@ 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 = '';
}
return array(