[fpc-devel] Recent changes to TField.SetData

LacaK lacak at zoznam.sk
Wed Apr 6 12:07:41 CEST 2011


Small optimalization use dsWriteModes instead of fixed set:
>
>
> -       if not (State in [dsEdit, dsInsert, dsFilter, dsCalcFields]) 
> then //here should be IMO also dsNewValue
+ if not (FDataSet.State in dsWriteModes) then

>          DatabaseErrorFmt(SNotEditing,[FDataSet.Name],FDataSet);
>
>        if ReadOnly and (FieldNo>0) and not (FDataSet.State in 
> [dsSetKey, dsFilter]) then
>          DatabaseErrorFmt(SReadOnlyField, [DisplayName], Self);
>
>  829   FDataSet.SetFieldData(Self,Buffer, NativeFormat);
> -------------------------------------------------------------------------- 
>

Laco.



More information about the fpc-devel mailing list