Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
QUery1.SQL.Clear;
Query1.SQL.Text:='Select * From USER where user='''+Edit1.Text+''' and password='''+Edit2.Text+'''';
Query1.Open;
if not Query1.Eof then begin
if Query1.FieldByName('SECTION').AsString = '1' then begin
Form1.Hide;
Form2.Showmodal;
end;
if Query1.FieldByName('SECTION').AsString = '2' then begin
Form1.Hide;
Form3.Showmodal;
end;
end else
ShowMessage('Wrong User or Password!')
end;
Klappt DANKEEEEEEEEEEEEEEEEEEE hatte es so ähnlich da war sicher wieder der Riesen Baum der den Wald verdeckt !!
lg
Timo