StringGrid의 내용을 기존 테이블에 업테이트 시킬려고 하는데 에러가 발생하거든요~
에러내용:Error careating cursor handle
Query1.Active:=False;
Query1.Close;
Query1.SQL.clear();
Query1.SQL.Add('Update'+'"'+DBName+'" Set Division=:Division,');
Query1.SQL.Add(' DutyNumber=:DutyNumber, Amount=:Amount');
For i:= 1 to 6 do begin
For t := 0 to ComponentCount - 1 do
if (Components[t] is TStringGrid) then
if Components[t].Name='StringGrid'+ inttostr(i) then
begin
For j:=1 to S do begin
Query1.paramByName('Division').AsSmallInt:=d;
Query1.paramByName('DutyNumber').AsSmallInt:=strtoint
(TStringGrid(Components[t]).Cells[0,j]);
Query1.paramByName('Amount').AsInteger:=strtoint
(TStringGrid(Components[t]).Cells[1,j]);
Query1.EXecSQL();
end;
end;