domingo, 24 de maio de 2009

Alterando driver de acesso do access no bde

Procedure ChangeAccessDLL32(Dll : String); // Altera a Propriedade do BDEDriversNativeMSACCESSDll32
var
Reg : TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('SoftwareBorlandDataBase
EngineSettingsDriversMSACCESSINIT', True)
then Reg.WriteString('DLL32',Dll);
finally
Reg.CloseKey;
Reg.Free;
end;
end;

//Use de preferência no OnCreate do Form ou DataModule da seguinte

ChangeACCESSDll32('IDDA3532.DLL'); // Mudando a DLL de acesso ao ACCESS

Nenhum comentário:

Postar um comentário