From 036570e3c1ebda7c25417858b6f8618c5b888ac0 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 5 Mar 2010 21:22:54 +0000 Subject: [PATCH] ENHANCEMENT Expose errors as they are available with sqlsrv driver in MSSQLDatabaseConfigurationHelper --- code/MSSQLDatabaseConfigurationHelper.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/MSSQLDatabaseConfigurationHelper.php b/code/MSSQLDatabaseConfigurationHelper.php index a1efccb..5c5f392 100644 --- a/code/MSSQLDatabaseConfigurationHelper.php +++ b/code/MSSQLDatabaseConfigurationHelper.php @@ -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(