esta duda va para caral: hice este login para mi aplicacion de acuerdo a tus sugerencia y me ha quedado asi:
Código Delphi
[-]procedure TFLogin.BitBtn1Click(Sender: TObject);
begin
LoginOK :=False;
ADLogin.Active:= True;
ADLogin.Parameters.ParamByName('cod').Value:= EUsuario.Text;
If ADLogin.RecordCount < 1 then
Begin
Cuenta := Cuenta + 1;
MessageDlg('Usuario no encontrado',mtError, [mbOK], 0);
EUsuario.Text := '';
EClave.Text := '';
ADLogin.Active := False;
If Cuenta = 3 then Close;
end
else
If ADLoginpass.AsString = EClave.Text then
Begin
LoginOk := True;
Usuario := ADLoginusername.AsString;
Nombre := ADLoginnom_user.AsString;
ADLogin.Active := False;
Close;
end
else
Begin
Cuenta := Cuenta + 1;
MessageDlg('Clave Inválida',mtError, [mbOK], 0);
EClave.Text := '';
ADLogin.Active := False;
If Cuenta = 3 then Close;
end;
end;
pero me sale el siguiente error al clickear el boton:
Cita:
---------------------------
Debugger Exception Notification
---------------------------
Project Sigesped.exe raised exception class EDatabaseError with message 'Missing Connection or ConnectionString'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
|
he tratado de dar con el problema y pues me ha roto la cabeza, existe la posibilidad de que el form principal sea MDI? trabajo con ado.
saludos...