Ini := TIniFile.Create(HelpPfad+'
\FB.INI');
UniConnection1.Server := Ini.ReadString('
Sicherheit','
Server', '
');
UniConnection1.Port := Ini.ReadInteger('
Sicherheit','
Port', 0);
UniConnection1.SpecificOptions.Values['
ClientLibrary'] :=
Ini.ReadString('
Sicherheit','
Client', '
fbembed.dll');
UniConnection1.LoginPrompt := Ini.ReadBool('
Sicherheit','
LoginPrompt', False);
UniConnection2.Server := UniConnection1.Server;
UniConnection2.Port := UniConnection1.Port;
UniConnection2.SpecificOptions.Values['
ClientLibrary'] :=
UniConnection1.SpecificOptions.Values['
ClientLibrary'];
UniConnection2.LoginPrompt := UniConnection1.LoginPrompt;
// Aktuelle Daten
UniConnection1.Database :=
Ini.ReadString('
Database','
RIS', '
RIS.FDB');
// Historische Daten
UniConnection2.Database :=
Ini.ReadString('
Database','
RISH', '
RISH.FDB');
// Existenz der Datenbanken prüfen
if not FileExists(UniConnection1.Database)
then
begin
Messagedlg('
Datenbank '+UniConnection1.Database+
'
nicht gefunden', mtError, [mbOK,mbHelp], 216);
Application.Terminate;
end;
if not FileExists(UniConnection2.Database)
then
begin
Messagedlg('
Datenbank '+UniConnection2.Database+
'
nicht gefunden', mtError, [mbOK, mbHelp], 216);
Application.Terminate;
end;
try
if not UniConnection1.Connected
then UniConnection1.Open;
except
on Exception do
begin
Messagedlg('
Verbindung zur aktuellen Datenbank fehlgeschlagen', mtError,
[mbOK,mbHelp],25);
Application.Terminate;
end;
end;
try
if not UniConnection2.Connected
then UniConnection2.Open;
except
on Exception do
begin
Messagedlg('
Verbindung zur historischen Datenbank fehlgeschlagen', mtError,
[mbOK,mbHelp],25);
Application.Terminate;
end;
end;
Ini.Free;
CFGIni.Free;