Ver Mensaje Individual
  #6  
Antiguo 10-07-2007
Avatar de magnu9
magnu9 magnu9 is offline
Miembro
 
Registrado: nov 2006
Posts: 84
Reputación: 20
magnu9 Va por buen camino
Otro problemita

Gracias ya logré resolver cierta parte de pasar el parametro con los =: puntos agregados antes de Cod en el String del EQL.

El problema radica ahora en que no me reconoce la clave de entrada. Pero si en vez de ponerlo IGUAL =.. lo coloco <> accede al sistema. En la parte que coloque las dos caritas.

Código Delphi [-]
procedure TFLogin.BtnOkClick(Sender: TObject);
begin
LoginOK :=False;
 // ADOQuery1.SQL.Add('Where codusu = '''+txtUsuario.Text+'''');
   AdoQuery1.Parameters.ParamByName('cod').Value:= txtUsuario.Text;
   AdoQuery1.Active:= True;
   If AdoQuery1.RecordCount < 1 then
    Begin
       Cuenta := Cuenta + 1;
       MessageDlg('Usuario no encontrado',mtError, [mbOK], 0);
       txtUsuario.Text := '';
       txtContra.Text := '';
       AdoQuery1.Active := False;
    If Cuenta = 3 then  Application.Terminate;
    end
   else
     If AdoQuery1pasusu.AsString = txtContra.Text then
        Begin
        LoginOk := True;
         Usuario := AdoQuery1codusu.AsString;
          Nombre := AdoQuery1pasusu.AsString;
          AdoQuery1.Active := false;
          Close; 
        end
     else
         Begin
           Cuenta := Cuenta + 1;
           MessageDlg('Clave Inválida',mtError, [mbOK], 0);
           txtContra.Text := '';
           AdoQuery1.Active := False;
      If Cuenta = 3 then Application.Terminate;
         end;
Responder Con Cita