Fórum Alguma função que verifique o MDAC? #307441
03/01/2006
0
Se alguém puder me ajudar
Atenciosamente
Luís Erucci
Erucci
Curtir tópico
+ 0Posts
03/01/2006
Marcio.theis
HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess\FullInstallVer
no regedit, ou a chave..
HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess\Version
ou ainda pode baixar um programa que a microsoft disponibilizou, para maiores informações acesse: http://www.lula.pro.br/artigo.asp?codigo=525&autor=Lula
Gostei + 0
03/01/2006
Marcio.theis
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Registry, StdCtrls, Buttons;
type
TForm1 = class(TForm)
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1Click(Sender: TObject);
var
reg: TRegistry;
ret, ret2: string;
begin
ret:=´´;
ret2:=´´;
reg:=TRegistry.Create;
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.OpenKey(´Software\Microsoft´, True);
if reg.OpenKey(´DataAccess´, False) then
begin
if reg.ValueExists(´FullInstallVer´) then
ret:=Reg.ReadString(´FullInstallVer´);
if reg.ValueExists(´Version´) then
ret2:=Reg.ReadString(´Version´);
end;
Application.MessageBox(PChar(´FullInstallVer -> ´ + ret + #13 + ´Version -> ´ + ret2),´Versão do MDAC´, MB_OK or MB_ICONINFORMATION);
reg.CloseKey;
reg.Free;
end;
end.Gostei + 0
03/01/2006
Erucci
procedure verificaMDAC;
Var Conexao: TADOConnection;
Begin
try
Conexao:=TADOConnection.Create(nil);
FreeAndNil(Conexao);
// OK, tem o MDAC instalado
// Versão:: Conexao.Version;
Except
// NÃO POSSUI O MDAC INSTALADO
end;
End;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)