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.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to