procedure TForm1.Button1Click(Sender: TObject);
begin
  adoquery1.Close;
  adoquery1.SQL.Clear;
  adoquery1.SQL.Add('select fname from xsgl..mmk where fname='+''''+edit1.text+'''');
  adoquery1.Open;
  if adoquery1.RecordCount<>0 then
    begin
      showmessage('yonghucunzai');
      adoquery1.Close;
      adoquery1.SQL.Clear;
      adoquery1.SQL.Add('select * from xsgl..mmk where fmima='+''''+edit2.text+'''');
      adoquery1.Open;
      if adoquery1.FieldByName('fname').asstring=edit1.text then
        begin
          showmessage('dengdaiyanzheng');         form1.Close;
          end
          else
          showmessage('safrea');
     end
     else
     showmessage('meiyouciyonghu');end;