Permalink
Browse files

Bringing the SQlserver datasource up to date, fixing a doc block

  • Loading branch information...
1 parent 90d8667 commit df2ef0e4f1465ac62b79cdd3f49301c9f908881f @lorenzo lorenzo committed Sep 29, 2011
Showing with 7 additions and 4 deletions.
  1. +6 −3 lib/Cake/Model/Datasource/Database/Sqlserver.php
  2. +1 −1 lib/Cake/Model/Datasource/DboSource.php
@@ -767,9 +767,12 @@ protected function _execute($sql, $params = array(), $prepareOptions = array())
}
return true;
} catch (PDOException $e) {
- $this->_results = null;
- $this->error = $e->getMessage();
- return false;
+ if (isset($query->queryString)) {
+ $e->queryString = $query->queryString;
+ } else {
+ $e->queryString = $sql;
+ }
+ throw $e;
}
}
@@ -417,7 +417,7 @@ public function execute($sql, $options = array(), $params = array()) {
* @param string $sql SQL statement
* @param array $params list of params to be bound to query
* @param array $prepareOptions Options to be used in the prepare statement
- * @return mixed PDOStatement if query executes with no problem, true as the result of a succesfull, false on error
+ * @return mixed PDOStatement if query executes with no problem, true as the result of a successful, false on error
* query returning no rows, suchs as a CREATE statement, false otherwise
*/
protected function _execute($sql, $params = array(), $prepareOptions = array()) {

0 comments on commit df2ef0e

Please sign in to comment.