0
Follow below the code:
procedure TfrmSelection.FormActivate(Sender: TObject);
var
ArqIni: TIniFile;
begin
ArqIni := ArqIni.Create('C:\sga\saga.ini');
try
ZConnection1.Connected := false;
ZConnection1.HostName := ArqIni.ReadString('BASEDADOS', 'PathSec', '');
ZConnection1.Database := ArqIni.ReadString('BASEDADOS','Base', '');
ZConnection1.Password := ArqIni.ReadString('BASEDADOS','Chave', '');
except
on E:Exception do MessageDlg('Erro ao conectar!'#13'Erro: '+ e.Message, mtError, [mbOK], 0);
end;
end;
However, I believe that this is the code that is giving error of Access Violation.
My question is: How would I improve the code to the point of recreating the folder, the file and the contents of it in case of deletion of the file. INI?
Thanks Marlon! Very Good! ;]
– Ramon Ruan