fix: [FreeTDS][SQL Server]Invalid cursor state
This commit is contained in:
@@ -29,19 +29,15 @@ class Connection
|
||||
$success = $statement->execute(!empty($values) ? $values : null);
|
||||
|
||||
if (!$success) {
|
||||
$statement->closeCursor();
|
||||
throw new SqlException('SQL There was an error executing the request');
|
||||
}
|
||||
|
||||
$rows = $statement->fetchAll($fetchMode);
|
||||
|
||||
if (!is_array($rows)) {
|
||||
$statement->closeCursor();
|
||||
throw new SqlException('PDO Unable to retrieve the result');
|
||||
}
|
||||
|
||||
$statement->closeCursor();
|
||||
|
||||
return new OdbcResultSet($rows);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user