--- fields.inc.ori	Wed Apr 13 08:50:56 2011
+++ fields.inc	Wed Apr 13 09:05:04 2011
@@ -820,12 +820,10 @@ procedure TField.SetData(Buffer: Pointer
 begin
   If Not Assigned(FDataset) then
     DatabaseErrorFmt(SNoDataset,[FieldName]);
-  if (FieldNo>0) and not (FDataSet.State in [dsSetKey, dsFilter]) then
-    begin
-    if ReadOnly then 
-      DatabaseErrorFmt(SReadOnlyField, [DisplayName], Self); 
-    Validate(Buffer);
-    end;
+  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);
   FDataSet.SetFieldData(Self,Buffer, NativeFormat);
 end;
 
@@ -890,7 +888,7 @@ end;
 procedure TField.Validate(Buffer: Pointer);
 
 begin
-  If assigned(OnValidate) Then
+  If assigned(OnValidate) and not (FDataSet.State in [dsSetKey,dsFilter]) Then
     begin
     FValueBuffer:=Buffer;
     FValidating:=True;
