免
免费地铁
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmLeave.Count(Ado1:TADOQuery;lab,edt,com,edt2: String);
begin
with Ado1 do
begin
Close;
SQL.Clear;
SQL.Add('select Sum(ADaySum) as LeaSumT from tbLeave where'+
' LeaType='''+lab+''' and tbLeave.StaffID='''+edt+''''+
' and DatePart(month,Atime)= '''+com+'''');
Open;
edt2 := FieldByName('LeaSumT').AsString;
end;
end;
Count(ADOCount,labThing.caption,edtNumb.Text,comMonth.Text,edtThing.Text);
这是我写的一个过程,和调用,为什么会没有结果,就是在运行时不会有错误提示,但是在相应的edit中却不能显示结果,请问这是为什么?
begin
with Ado1 do
begin
Close;
SQL.Clear;
SQL.Add('select Sum(ADaySum) as LeaSumT from tbLeave where'+
' LeaType='''+lab+''' and tbLeave.StaffID='''+edt+''''+
' and DatePart(month,Atime)= '''+com+'''');
Open;
edt2 := FieldByName('LeaSumT').AsString;
end;
end;
Count(ADOCount,labThing.caption,edtNumb.Text,comMonth.Text,edtThing.Text);
这是我写的一个过程,和调用,为什么会没有结果,就是在运行时不会有错误提示,但是在相应的edit中却不能显示结果,请问这是为什么?