Ver Mensaje Individual
  #7  
Antiguo 17-06-2003
Avatar de Rox77
Rox77 Rox77 is offline
Miembro
 
Registrado: may 2003
Ubicación: Caceres
Posts: 44
Reputación: 0
Rox77 Va por buen camino
Hola:

Lo prometido es deuda (Kafu) asique aqui tienes...espero te sirva de algo.


unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, DBTables, BDE;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Session1: TSession;
Memo1: TMemo;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
function IsBDEExist : boolean;
begin
Result := (dbiInit(nil) = 0);
end;
begin
if IsBDEExist then showmessage('SI, BDE esta instalado')
// Existe
else showmessage('NO, BDE no esta instalado. Instalalo.');
// No existe
end;

procedure TForm1.Button2Click(Sender: TObject);
var
DriverParams: TStringList;
begin
DriverParams := TStringList.Create;
try
{ add the parameters that you want to change only. The default for
this param is 31. }
DriverParams.Add('DLL32=IDDA3532.DLL');

{ call modify driver with name of driver and list of params }
session1.ModifyDriver('MSACCESS',DriverParams);

{ call this if you want to save the changes in the BDE for all
applications to use, will only take affect after all BDE applications
have been unloaded on the system. }
session1.SaveConfigFile;
finally
DriverParams.Free;
end;
end;


procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;

end.



Saludos.
Responder Con Cita