数据库课程设计,销售管理系统,delphi和sql做的,谁有啊??急救![email protected]

如题所述

function Chr(X: Byte): Char;
Chr returns the character with the ordinal value (ASCII value) of the byte-type expression, X.
将ASCII值转换成char
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-01-09
可惜我不用delphi
第2个回答  2011-01-14
if trim(edtCode.Text) = '' then
begin
showMsg('请输入用户代码');
if edtCode.CanFocus then edtCode.SetFocus;
edtCode.SelectAll;
exit;
end;

if trim(edtPassword.Text) = '' then
begin
showMsg('请输入用户密码');
if edtPassword.CanFocus then edtPassword.SetFocus;
edtPassword.SelectAll;
exit;
end;

with qryUser do
begin
close;
SQL.Text := 'select * from s_userInfo where isUse=1 and code=:code';
Parameters.ParamByName('code').Value := edtCode.Text;

try
Open;
except
qryErrorMsg;
Exit;
end;

if isEmpty then
Begin
edtName.Text := '';
showMsg('用户代码不存在或用户没有权限');
if edtCode.CanFocus then edtCode.SetFocus;
edtCode.SelectAll;
exit;
End;

edtName.Text := FieldByName('name').AsString;

if FieldByName('password').AsString <> trim(edtPassword.Text) then
Begin
showMsg('密码错误');
edtPassword.SetFocus;
edtPassword.SelectAll;
exit;
End;
end;
相似回答
大家正在搜