Board index » delphi » Edit method of TClientDataSet
Oujiahan
Delphi Developer |
Edit method of TClientDataSet2003-06-30 08:05:29 AM delphi82 Dear all, I meet a problem with TClientDataSet.When a field comes from other fields,Edit method of TClientDataSet raises errors.For an example: with TClientDataSet do begin Close; CommandText := ' SELECT *, AAA=Field1+Field2 FROM TABLE1 '; .... Open; FieldByName('AAA').ReadOnly := False; Edit; FieldByName('AAA').AsString := 'OK'; Post; end; If I use APPEND method, it is no problem, but EDIT method raises "The field is readonly, cannot be modified". Can you help me?Thanks. |