public function fetch()
{
if (null !== $this->statement) {
return sqlsrv_fetch_array($this->statement, SQLSRV_FETCH_ASSOC);
} else {
if (!isset($this->result)) {
throw new Exception('Error: The database result resource is not currently set.');
}
return sqlsrv_fetch_array($this->result, SQLSRV_FETCH_ASSOC);
}
}