Hi, I wonder if it possible to only include the actually changed fields in TZGenericCachedResolver.FormUpdateStatement?
My problem is that my program is being used in the multi-user environment and sometimes users change the same record (but different fields) from different connections.
Since all fields are being rewritten only one change persists.
I wonder if it's possible to check if the field has been changed and only include the relevant fields.
I think it should also be great for speed.
FWIW I'm on 7.1.3 and use TZQuery -> TDatasource -> TDBEdit's in this particular place. The DB is Firebird 2.5.
Update only the changed fields
-
- Platinum Boarder
- Posts: 1999
- Joined: 17.01.2011, 14:17
Re: Update only the changed fields
Hello,
I am not entirely sure about Zeos 7.1 but in Zeos 7.2 TZQuery has the property UpdateMode and if you set it to umUpdateChanged that should work as you expect it to work.
Best regards,
Jan
I am not entirely sure about Zeos 7.1 but in Zeos 7.2 TZQuery has the property UpdateMode and if you set it to umUpdateChanged that should work as you expect it to work.
Best regards,
Jan
Re: Update only the changed fields
Thank you
It seems to rely exclusively on the primary keys in DB (I mean the sql where clause)
Is there any way I can pass the index field name via TZTable parameters? I don't have the actual primary key in the DB for that table.
It seems to rely exclusively on the primary keys in DB (I mean the sql where clause)
Is there any way I can pass the index field name via TZTable parameters? I don't have the actual primary key in the DB for that table.
-
- Platinum Boarder
- Posts: 1999
- Joined: 17.01.2011, 14:17
Re: Update only the changed fields
Hello duzenko,
you could use UpdateMode umWhereAll. But that contradicts your idea to mix changes from different work places. umUpdateChanged only makes sense if you have a primary key defined.
Best regards,
Jan
you could use UpdateMode umWhereAll. But that contradicts your idea to mix changes from different work places. umUpdateChanged only makes sense if you have a primary key defined.
With current versions of Zeos you can't. Define a primary key.duzenko wrote:Is there any way I can pass the index field name via TZTable parameters? I don't have the actual primary key in the DB for that table.
Best regards,
Jan
Re: Update only the changed fields
Dataset/DB property DSProps_KeyFields lets you manually define fields which will be considered "key". I use this tech for views