--- ---

With different versions of MDAC available it is sometimes good to check whether the latest version is installed to make sure everything works fine. The following function returns the installed ADO version.

    uses
      ComObj;
    function GetADOVersion: Double;
    var
      ADO: OLEVariant;
    begin
      try
        ADO := CreateOLEObject('adodb.connection');
        Result := StrToFloat(ADO.Version);
        ADO := null;
      except
        Result := 0.0;
      end;
    end;