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'], 'UID' => $databaseConfig['username'],
'PWD' => $databaseConfig['password'] 'PWD' => $databaseConfig['password']
)); ));
$errors = sqlsrv_errors();
if($errors) {
$error .= "\n";
foreach($errors as $detail) {
$error .= "\n" . @$detail['message'] . "\n";
}
}
} }
if($conn) { if($conn) {
$success = true; $success = true;
} else { } else {
$success = false; $success = false;
$error = '';
} }
return array( return array(