解决方案 »

  1.   

    你反正是select *的,再比较下用户名或者密码,就能区分大小写了。
      

  2.   

    如何能够区分大小写登陆
    程序代码是这样的 请高手帮我看看问题出在什么地方
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    try
        with adoquery1 do     
        begin
          close;       
          sql.clear;   
         
          sql.add('select * from 管理 where 用户名=:a and 密码=:b ');
        
          parameters.ParamByName('a').Value:=trim(combobox1.Text);
          parameters.ParamByName('b').Value:=trim(edit1.Text);
         
          if combobox1.Text ='' then
            begin
              application.MessageBox('请输入用户名','提示信息',64);
              combobox1.SetFocus;
              exit;   
            end;
        
          if edit1.Text ='' then
            begin
              application.MessageBox('请输入密码','提示信息',64);
              edit1.SetFocus;
              exit;   
            end;
          open;      //以上用户输入都正常,打开数据库 
          end;
          
          if adoquery1.RecordCount<>0 then
            begin
           
              application.MessageBox('登陆成功','提示信息',64);
              Form2.show;  //需要再建立一个form窗口用来作为登录正确后显示的窗体 
              self.Hide;
            end
          else
            application.MessageBox('输入的用户名或密码错误','提示信息',64);
      except
        application.MessageBox('登陆失败','提示信息',64);
      end; end;