Browse Source

- check for editable state in SetFieldData

joost 20 years ago
parent
commit
734aa62d36
1 changed files with 5 additions and 0 deletions
  1. 5 0
      fcl/db/bufdataset.inc

+ 5 - 0
fcl/db/bufdataset.inc

@@ -421,6 +421,11 @@ var
   FieldUpdBuf : PFieldUpdateBuffer;
 
 begin
+  if not (state in [dsEdit, dsInsert]) then
+    begin
+    DatabaseErrorFmt(SNotInEditState,[NAme],self);
+    exit;
+    end;
   If Field.Fieldno > 0 then // If = 0, then calculated field or something
     begin
     CurrBuff := ActiveBuffer;