Call to undefined function db_set_active() I sure I have succeed to use these snippets in previous code, but now I get a "Call to undefined function db_set_active()" error. I don't understand why.

public function allUnits() {
  global $dbUtil;

  $list = array();
  $qryStr = "SELECT * FROM unit ORDER BY u_id";

  db_set_active('mpd_pro');
  $rs = db_query($qryStr);

  while ($row = $rs-&gt;fetchAssoc()) {
    $list[$row["u_id"]] = $row;
  }

  db_set_active('default');

  return ($list);
}
The 2 things that come to mind: your installation is  not bootstrapping properly (improperly configured .htaccess or settings.php) , or you installation is corrupt.

I would recheck the apache logs, watchdog logs to see if any errors are mentionned, if all fails I would see if the application works with this module disabled, because this function is defined in core on line 2519 in includes/database/database.inc and should be available from all your custom module code.

Hope this helps, cheers!