el codigo del data module:
Código Delphi
[-] private
function abrir(var tabla:TTable):boolean;
public
end;
var
B: TB;
implementation
uses Unit1_diligencias;
{$R *.dfm}
procedure TB.DataModuleCreate(Sender: TObject);
begin
Diligen.DataBaseName:= Ventana.path_aplicacion;
Filiaciones.DataBaseName:=Diligen.DataBaseName;
solicitarDatos.DataBaseName:=Diligen.DataBaseName;
if (not abrir(Diligen)) or (not abrir(Filiaciones)) or (not abrir(solicitarDatos)) then Halt;
end;
function TB.abrir(var tabla:TTable):boolean;
begin
try Diligen.active:=True;
except
Messagedlg('No se puede abrir la base de datos: '
+tabla.tablename, mtError, [mbOK], 0);
end;
abrir := (Diligen.active);
end;
end.