各位大侠你们好 ,我已经做了一个应用程序界面,想通过输入口令并通过对数据库地查询得到严正的效果,恳请各位大侠帮助,最好有源代码

解决方案 »

  1.   

    ts2 :=edtpasswd.text;
          with qryUsers do begin
             Close;
             DataBaseName:=SYS_DBNAME;
             SQL.Clear;
             SQL.Add('select * from Staffs where (StaffCode='''+ts1+''')');
             Open;
             if not eof then begin
                if FieldByName('Passwd').AsString<>ts2 then begin
                   WarningMsgBox('用户口令错误!');
                   edtUserPassWord.setfocus;
                   Exit;
              end;
      

  2.   

    搜索以前的帖子吧,use“登录”或者“登陆”
    pick it up urself
      

  3.   

    var
     strsql:string;
    begin
    if 检查你的必要edit中的text=‘’ then
      begin
      showmessage('必要数据不能为空');
      abort; 
      end;
    else
      begin
      strsql:='select 与你必要信息有关的字段名 from 表 where 对应字段=对应edit.text';
      query.sql.clear;
      query.sql.text:=strsql
      query.open;
      if query.eof then
        begin
       showmessage('该用户不存在');
        exit;
        end
      else
        你向要的程序继续执行,我猜你要进入系统界面了;
      query.close;
      end;
    end;
      

  4.   

    呵呵,来晚了,完全同意setfocus(東不懂) 的看法
    顺便up一下