H
hqlww
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button2Click(Sender: TObject);
var
s:string;
begin
s:='';
if radiobutton1.checked then s:=s+'dept like:dept'
else if radiobutton2.checked then s:=s+'salary>:salary'
else if radiobutton3.checked then s:=s+'sex like:sex';
if s<>'' then
begin
close;
query1.sql.clear;
query1.sql.add('select * from yuangong.db');
query1.sql.add('where'+s);
if radiobutton1.checked then
query1.params.paramValues['dept']:=combobox1.text
else if radiobutton2.checked then
query1.params.paramValues['salary']:=strtoint(edit2.text)
else query1.params.paramValues['sex']:=combobox2.text;
query1.open;
end;
end;
这个程序是为了实现查询功能的,运行时出现错误,请指教!
project project2.exe raised exception class EDBEngineError with message'Invalid use of keyword.
token:like?
line Number:2'.Process stopped Use Step or Run to continue这个是什么意思啊?
var
s:string;
begin
s:='';
if radiobutton1.checked then s:=s+'dept like:dept'
else if radiobutton2.checked then s:=s+'salary>:salary'
else if radiobutton3.checked then s:=s+'sex like:sex';
if s<>'' then
begin
close;
query1.sql.clear;
query1.sql.add('select * from yuangong.db');
query1.sql.add('where'+s);
if radiobutton1.checked then
query1.params.paramValues['dept']:=combobox1.text
else if radiobutton2.checked then
query1.params.paramValues['salary']:=strtoint(edit2.text)
else query1.params.paramValues['sex']:=combobox2.text;
query1.open;
end;
end;
这个程序是为了实现查询功能的,运行时出现错误,请指教!
project project2.exe raised exception class EDBEngineError with message'Invalid use of keyword.
token:like?
line Number:2'.Process stopped Use Step or Run to continue这个是什么意思啊?