Subject | Re: [firebird-support] INSERT efficiency |
---|---|
Author | Dan Wilson |
Post date | 2004-01-21T04:38:45Z |
Markus,
DSQL.IB_Transaction.Commit;
> RecCnt := 0;{ Shouldn't there be a final commit here? }
> while not eof(Fi) do begin
> readln(Fi,S);
> Parse(S); { parse string "S" into structure "Rec" }
> Param1.AsInteger := Rec.ID1;
> Param2.AsInteger := Rec.ID2;
> DSQL.Execute;
> Inc( RecCnt );
> if ((RecCnt mod 10000) = 0) and DSQL.IB_Transaction.Started then
> begin
> DSQL.IB_Transaction.Commit;
> DSQL.IB_Transaction.StartTransaction;
> end;
> end;
> finally
> DSQL.Free;
DSQL.IB_Transaction.Commit;
> end;
> end;