summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/adodb-mssqlnative.inc.php6
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;