第一行‘:’附近有语法错误。
function Tfrmlogin.VerifyAccount: Boolean;var
str:string;
begin
Result:= False;
with ADOQuery1 do
begin
close;
sql.Clear;
str:='select * from userinfo where (username=:a and userpassword=:b and usertype=:c)';
sql.Add(str);
adoquery1.Parameters.ParseSQL(ADOQuery1 .SQL.Text, true);
Parameters.ParamByName('a').Value:=Trim(RzEdit1.Text);
Parameters.ParamByName('b').Value:=Trim(RzEdit2.Text);
Parameters.ParamByName('c').Value:=Trim(RzComboBox1.Text);
open;
first;
end;
if ADOQuery1.RecordCount > 0 then ModalResult := mrOk;
Result := ModalResult = mrOk;
end;
运行提示:第一行‘:’附近有语法错误。到底在哪里呀,大家帮忙给看看