crear login con adotable
este es el codigo que tengo pero me esta dando un error cuando ley al boton aceptar me tira esta error proct factura.exe raised exception clase edatabaserror with message`ADOtable1: cannot perform this operation on a closed dataset`. process stopped. use step or run to continue. y este es el codigo
var
Login: TLogin;
implementation
{$R *.dfm}
procedure TLogin.Button1Click(Sender: TObject);
begin
application.Terminate;
end;
procedure TLogin.Button2Click(Sender: TObject);
begin
if adotable1.Seek(edit1.Text) then
else
showmessage ('UsuarionNo existe');
end;
end.
quiero saber cual es el parametro o funcion corecta para hacel la conparacion de la tabla
if adotable1.Seek(edit1.Text) then
no se si esta esta correta
esta me funciona bien pero es con ttable pero me lo esta pidiendo usando adotable. en el miismo proyecto pero me estan pideine que tiene que ser con adotable
var
frmLogin: TfrmLogin;
implementation
{$R *.dfm}
procedure TfrmLogin.Button2Click(Sender: TObject);
begin
Application.Terminate;
end;
procedure TfrmLogin.Button1Click(Sender: TObject);
begin
if Table1.FindKey([Edit1.Text]) then
if Table1CLAVE.Value = Edit2.Text then
Close
else
ShowMessage('clave incorrecta!')
else
ShowMessage('Usuario no existe!');
end;
esta esta perfeta mente.
gracia y espero que me puedad ayudar.
|