to be honest,I don't think the two options you metioned is good.
This operation can only work one one single row. Meaning if you have 100 rows you would have to issue 100 separate queries.
When you have several clients working with the same DB - how would Client A inform CLient B that he just changes the PK for the row Client B is processing and so the Client B should drop hios work ad start processing anew with different PK value ???
1) For a table with large amount of modifications,
- First I pack the new table as a TStream, and send it to server.
- Server first delete all records of the specific condition.
- Server inserts all records received from the client.
update multiple rows at once? Both at SQL level
Primary key is Pid + Qid, both are integer values. Only one client is allowed to operate on a group of records --- i.e. PID --- once any PID is used by any one client, editing records with that PID is not allowed.
DeltaDS.FieldByName('Update_Time').NewValue:=now;
There was no modification/updating in the list. Do you just forget it?
Actually,the key point is how to store all changed records on client-side in one package just like clientdataset.delta, and then send these data to server-side, and then server-side how to handle these changed-records ?
yes,it support lazarusBut maybe problematic
* "rtcISAPIApp.pas" unit,ISAPI interface:I have never heared that Borland have gave code to OpenSource.
Copyright (c) Borland Inc.
* "rtcNixSock.pas" unit, blocking Linux Sockets API access:
Portions from Synapse, Copyright (c) 1999-2002 by Lukas Gebauer
* "rtcWinSock.pas" unit, blocking Windows Sockets API access:
Portions from ICS, Copyright (C) 1996-2001 by François PIETTE
Portions from Synapse, Copyright (c) 1999-2002 by Lukas Gebauer
* "rtcWinSocket.pas" unit, async Windows Sockets API access:
Portions from ICS, Copyright (C) 1996-2001 by François PIETTE
* "rtcZLib.pas" unit, ZLib compression and decompression functions:
Portions from "ZlibEx.pas", Copyright (c) 2000-2005 base2 technologies
Portions from "Zlib.pas", Copyright (c) 1997 Borland International
yes,it support lazarus