Escolar Documentos
Profissional Documentos
Cultura Documentos
21:23
2 - Save All
Formulário:
Arquivo: fPrincipal.pas
Nome: frmPrincipal
Projeto: DugSystem.dproj
Arquivo : fConfigConexao
Nome : frmConfigConexao
Adicionamos a ele um Panel com um botão de Confirmar e um botão de Cancelar, onde o cada um deve
try
SQLConnection.Open;
except
on E : Exception do
begin
MessageDlg('Não foi possivel conectar a base de dados, por favor verifique as configurações.'
+#13#10+'Erro :'+ E.Message
,mtError,[mbOk],0);
lfrmConfigConexao := TfrmConfigConexao.Create(Application);
try
lfrmConfigConexao.vleConfig.Strings := SQLConnection.Params;
if lfrmConfigConexao.ShowModal = mrOk then
begin
SQLConnection.Params := lfrmConfigConexao.vleConfig.Strings;
SQLConnection.Open;
end;
finally
lfrmConfigConexao.Free;
end;
end;
end;
SQLConnection.Params.SaveToFile(ArquivoConexao);
end;
->Forms