H
hqlww
Unregistered / Unconfirmed
GUEST, unregistred user!
这个程序得不到我想要的结果,请厉害的人帮我修改一下,如果你不会,看看我这个模块也不错。谢谢你了!
如果你有,请提供给我,我会加分给你的。
procedure TForm1.Button3Click(Sender: TObject);
var
a,b,c:string;
begin
a:='';
b:='';
c:='';
a:=a+'salary>:salary_1';
b:=b+'hiredata>:hiredata_1';
c:=c+'dept like :dept_1';
query1.close;
query1.sql.Clear;
query1.sql.add('select * from yuangong.db');
query1.sql.add('where '+a);
query1.sql.add(' and '+b);
query1.sql.add(' and '+c);
query1.params.paramValues['salary_1']:=strtoint(combobox3.text);
query1.params.paramValues['hiredata_1']:=strtodate(combobox4.text);
query1.params.paramValues['dept_1']:=combobox5.text;
query2.close;
query2.sql.clear;
query2.sql.add('select avg(salary) from yuangong.db');
query2.sql.add('where '+a);
query2.sql.add(' and '+b);
query2.sql.add(' and '+c);
query2.open;
query1.execsql;
query1.open;
end;
如果你有,请提供给我,我会加分给你的。
procedure TForm1.Button3Click(Sender: TObject);
var
a,b,c:string;
begin
a:='';
b:='';
c:='';
a:=a+'salary>:salary_1';
b:=b+'hiredata>:hiredata_1';
c:=c+'dept like :dept_1';
query1.close;
query1.sql.Clear;
query1.sql.add('select * from yuangong.db');
query1.sql.add('where '+a);
query1.sql.add(' and '+b);
query1.sql.add(' and '+c);
query1.params.paramValues['salary_1']:=strtoint(combobox3.text);
query1.params.paramValues['hiredata_1']:=strtodate(combobox4.text);
query1.params.paramValues['dept_1']:=combobox5.text;
query2.close;
query2.sql.clear;
query2.sql.add('select avg(salary) from yuangong.db');
query2.sql.add('where '+a);
query2.sql.add(' and '+b);
query2.sql.add(' and '+c);
query2.open;
query1.execsql;
query1.open;
end;