diff options
| author | Mark Newnham <mark@newnhams.com> | 2020-05-31 18:57:48 -0600 |
|---|---|---|
| committer | Mark Newnham <mark@newnhams.com> | 2020-05-31 18:57:48 -0600 |
| commit | 76145bb52f0cc1c659f08574fede3183ee3135ae (patch) | |
| tree | 5add506704e6af58c977675df4940e60d6aca7b8 | |
| parent | c47e5c272e98a06e1c92248b5d9d1ae0afe71c97 (diff) | |
| download | adodb-76145bb52f0cc1c659f08574fede3183ee3135ae.tar.gz adodb-76145bb52f0cc1c659f08574fede3183ee3135ae.tar.bz2 adodb-76145bb52f0cc1c659f08574fede3183ee3135ae.zip | |
Retrieve error messages early before connection close #614
Error messages from last error are lost if the
connection is closed before retrieval
| -rw-r--r-- | drivers/adodb-mssqlnative.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/adodb-mssqlnative.inc.php b/drivers/adodb-mssqlnative.inc.php index 53be16ce..1f48a32f 100644 --- a/drivers/adodb-mssqlnative.inc.php +++ b/drivers/adodb-mssqlnative.inc.php @@ -1080,6 +1080,12 @@ class ADORecordset_mssqlnative extends ADORecordSet { is running. All associated result memory for the specified result identifier will automatically be freed. */ function _close() { + /* + * If we are closing down a failed query, collect any + * error messages. This is a hack fix to the "close too early" + * problem so this might go away later + */ + $this->connection->errorMsg(); if(is_resource($this->_queryID)) { $rez = sqlsrv_free_stmt($this->_queryID); $this->_queryID = false; |
