procedure TForm1.BitBtn2Click(Sender: TObject);
begin
adostoredproc1.Parameters.ParamByName('@rq1').Value:=date1.Date;
adostoredproc1.Parameters.ParamByName('@rq2').Value:=date2.Date;
adostoredproc1.Open;
adostoredproc1.First;
while not adostoredproc1.Eof do
begin
with qtmp do
begin
close;
sql.Clear;
sql.Add('update f_wxgz set gz3='''+adostoredproc1.fieldbyname('产量').Value+'''-'''+adostoredproc1.fieldbyname('疵布').Value+''' where f_wxgz.xm='''+adostoredproc1.fieldbyname('姓名').AsString+''' and nf='''+formatdatetime('yyyy',rq1.date)+''' and yf='''+formatdatetime('MM',rq1.date)+''' ');
showmessage(sql.Text);
ExecSQL;
end;
adostoredproc1.Next;
end;
end;
begin
adostoredproc1.Parameters.ParamByName('@rq1').Value:=date1.Date;
adostoredproc1.Parameters.ParamByName('@rq2').Value:=date2.Date;
adostoredproc1.Open;
adostoredproc1.First;
while not adostoredproc1.Eof do
begin
with qtmp do
begin
close;
sql.Clear;
sql.Add('update f_wxgz set gz3='''+adostoredproc1.fieldbyname('产量').Value+'''-'''+adostoredproc1.fieldbyname('疵布').Value+''' where f_wxgz.xm='''+adostoredproc1.fieldbyname('姓名').AsString+''' and nf='''+formatdatetime('yyyy',rq1.date)+''' and yf='''+formatdatetime('MM',rq1.date)+''' ');
showmessage(sql.Text);
ExecSQL;
end;
adostoredproc1.Next;
end;
end;
解决方案 »
- 在界面上添加fastreport4.0报表出错,谁能帮忙看看,困扰几天了
- 谢谢
- 已知IE窗口句柄,如何隐藏它在任务栏上的按钮
- 如何将一个控件设置为不可覆盖。我的TShape控件老是TLabel控件覆盖,有没有办法设置TShape控件的级别高于TLabel
- 请教delphi高手,急。。。。
- 如何屏蔽WINDOWS的各个功能,并使自已的程序永远在桌面最上层不会失去焦点?
- juliens(星星球),form(form)进来领分
- 请问:怎样通过两次按键(Enter)达到鼠标左键单击的效果?快快快!!!!!
- 同行请帮忙:用delphi开发CTI(Dialogic)的接口
- ERP指什么?
- 鼠标自动点击的功能??
- 各位同仁新年好
update f_wxgz set gz3='''+adostoredproc1.fieldbyname('产量').Value+'''-'''+adostoredproc1.fieldbyname('疵布').Value+''' where f_wxgz.xm='''+adostoredproc1.fieldbyname('姓名').AsString+''' and nf='''+formatdatetime('yyyy',rq1.date)+''' and yf='''+formatdatetime('MM',rq1.date)+''' ');这句问题,你显示下这里的sql.text,引号的问题