Unit 'msesqldb' Package
[Overview][Constants][Types][Classes][Index] [#msegui]

tmsesqlquery.onapplyrecupdate

Called for each modified, inserted or deleted record on applyupdates, to replace the automatically generated update statement, e.g. for a query on a join

Declaration

Source position: msesqldb.pas line 225

published property tmsesqlquery.onapplyrecupdate : applyrecupdateeventty
  read fonapplyrecupdate
  write setonapplyrecupdate;

Description

Called for each modified, inserted or deleted record on applyupdates, to replace the automatically generated update statement, e.g. for a query on a join. Return the SQL statement in asql (it is executed in the write transaction), leave it empty to use the generated statement, or set done to True if the update was done otherwise. Build the values with fieldtosql or the assql function of the fields:

procedure tmainfo.recupdate(const sender: tmsesqlquery;
            const updatekind: tupdatekind; var asql: msestring;
            var done: boolean);
begin
 if updatekind = ukmodify then begin
  asql:= 'update TABLE1 set FIELD1 = '+field1.assql+
                                     ' where PK = '+pk.assql;
 end;
end;

Documentation generated on: 2026-10-03