Beispiel #1
0
 public static function RetrieveServerVersion(EngConnection $connection) {
     try {
         $versionString = $connection->ExecScalarSQL('SELECT version()');
         if ((preg_match("/(\d+)\.(\d+)/", $versionString, $matches)) && (count($matches) == 3)) {
             $connection->GetServerVersion()->SetMajor($matches[1]);
             $connection->GetServerVersion()->SetMinor($matches[2]);
         }
     } catch (Exception $e) {
     }
 }
 public function Execute(EngConnection $connection)
 {
     $this->GetCommandImp()->SetServerVersion($connection->GetServerVersion());
     $this->GetCommandImp()->ExecuteUpdateCommand($connection, $this);
 }
 public function Execute(EngConnection $connection)
 {
     $this->GetCommandImp()->SetServerVersion($connection->GetServerVersion());
     return $this->GetCommandImp()->ExecuteSelectCommand($connection, $this);
 }
 public static function RetrieveServerVersion(EngConnection $connection)
 {
     try {
         $values = array();
         $connection->ExecQueryToArray('EXEC master..xp_msver \'ProductVersion\'', $values);
         if (count($values) > 0) {
             $strVersion = $values[0]['Character_Value'];
             list($major, $minor) = explode('.', $strVersion);
             $connection->GetServerVersion()->SetMajor($major);
             $connection->GetServerVersion()->SetMinor($minor);
         }
     } catch (Exception $e) {
     }
 }