没有使用 update 语句,直接在 while 中修改数据是否可行?
while not Eof do
begin //............处理其它事 Edit;
FieldByName('xxx').AsString:='1';
Post; Next;
end;
while not Eof do
begin //............处理其它事 Edit;
FieldByName('xxx').AsString:='1';
Post; Next;
end;
解决方案 »
- 以UDP协议作为服务端,如何写给个思路?
- 请教接口的运用
- 遇到难题了。。急呀。关于输入控件的合法性校验(sorry..无分了)
- 關於execl的自動換行和自動調整列的寬度和高度,急,請大家多指點.以前好像沒有相關貼子.
- 请看这是什么问题
- 关于图表
- 超级解霸那样的软件和我们用delphi中那个mediaplayer做的有什么不同?
- 请教 PaintBox 和 color dialog 的问题
- 为什么我用assignprn(pfile,'LPT1'); 报错呢
- 我怎么不能给分啊?
- 请教自动编号出现list index out of bounds(1)问题
- 大家好,我是初学者,能不能推荐几本好一些的书籍啊,谢谢
var
iLoop:integer;
begin
inherited;
CQ_JB_P_F:=TCQ_JB_P_F.Create(Self);
if CQ_JB_P_F.ShowModal=mrok then
begin
cxGrid2.BeginUpdate;
cxGrid2DBBandedTableView1.BeginUpdate;
for iLoop:=0 to cxGrid2DBBandedTableView1.DataController.GetSelectedCount -1 do
begin
cxGrid2DBBandedTableView1.Controller.FocusedRow:=cxGrid2DBBandedTableView1.Controller.SelectedRows[iLoop];
adoq_JB.Edit;
adoq_JB.FieldByName('JBRQ').AsString:=FormatDateTime('yyyy/mm/dd',DT);
adoq_JB.FieldByName('KSSJ').AsString:=FormatDateTime('hh:mm:ss',DtKSSJ);
adoq_JB.FieldByName('JSSJ').AsString:=FormatDateTime('hh:mm:ss',DtJSSJ);
adoq_JB.FieldByName('JBYY').AsString:=StrJBYY;
adoq_JB.FieldByName('JBDD').AsString:=StrID;
adoq_JB.FieldByName('STATUS').AsString:=StrJBLX;
end;
cxGrid2DBBandedTableView1.EndUpdate;
cxGrid2.EndUpdate;
end;
end;
procedure TRES_CQ_JB_F.N1Click(Sender: TObject);
var
iLoop:Integer;
begin
inherited;
if _JuMaPao=3 then
begin
if IsZCJB=2 then
begin
CQ_JB_P_F:=TCQ_JB_P_F.Create(Self);
if CQ_JB_P_F.ShowModal=mrok then
begin
cxGrid2.BeginUpdate;
cxGrid2DBTableView1.BeginUpdate;
for iLoop:=0 to cxGrid2DBTableView1.DataController.GetSelectedCount -1 do
begin
cxGrid2DBTableView1.Controller.FocusedRow:=cxGrid2DBTableView1.Controller.SelectedRows[iLoop];
adoq_JB.Edit;
adoq_JB.FieldByName('JBRQ').AsString:=FormatDateTime('yyyy/mm/dd',DT);
adoq_JB.FieldByName('SJKSSJ').AsString:=FormatDateTime('hh:mm:ss',DtKSSJ);
adoq_JB.FieldByName('SJJSSJ').AsString:=FormatDateTime('hh:mm:ss',DtJSSJ);
adoq_JB.FieldByName('SJJBSS').AsString:=FormatDateTime('hh:mm:ss',FlGZSS);
adoq_JB.FieldByName('JBYY').AsString:=StrJBYY;
adoq_JB.FieldByName('JBDD').AsString:=StrID;
adoq_JB.FieldByName('STATUS').AsString:=StrJBLX;
adoq_JB.Post;
end;
cxGrid2DBTableView1.EndUpdate;
cxGrid2.EndUpdate;
end;
end;
end;
end;