UpWhereChanged and ProviderFlags=[pfInWhere] lazarus / 16-Databases ---------------------------------------------------------------------- Ign_17 · 2017-08-01 08:07 Hi everybody, I´m a bit confused about the property "Upda]"]>Blockedde = UpWhereChanged" and the "pfInWhere" value in ProviderFlags property. As i´ve unsderstood, just especyfing "UpWhereChanged", automatically the fields to modify on a update operation are included in the WHERE clause of a UPDATE command. On the other hand, Providerflags=[pfInWhere] specify whether a specific field is incluyed or not in the WHERE clause of an UPDATE command.  It seems both options plays the same or a similar role, specifying what fields will appear in the Where clause of an update operation. Please, can anyone explain me what is the difference, and how these two properties ( UpWhereChnged and TproviderFlags.pfInWhere) are related one with the other? Thanks in advance ---------------------------------------------------------------------- LacaK · 2017-08-01 13:09 upWhereChanged is specified at TSQLQuery level. It says, that TSQLQuery updates should be constructed into SQL where WHERE part consists of fields, which are locally changed + always fields which are part of primary key. pfInWhere is specified at TField level. So this give you additional possibility include/exclude individual fields. So if field is part of primary key then it is always also part of SQL WHERE clause. Next if Upda]"]>Blockedde=upWhereChanged AND field is changed then if Fields ProviderFlag has pfInWhere (default) then this field is added to where clause in other cases is not added. ---------------------------------------------------------------------- Ign_17 · 2017-08-01 17:53 Perfectly clear, thank you very much for your explanation. Regards,