Data patch

xiaoxiao2021-03-06  58

When the company wants to send data to the customer regularly, and the database is large, but each time the amount is small, this will not be sent to the entire database, as long as you send a data patch, you can update the entire database on the client. . The following is a single table operation ================================================ ======================================= (Company: Source Table SRC: Old Database, Target Table DST: New Database) ===> Data Patch (Company: Source Table SRC: Old Database) <=== Data Patch

method:

(A) In the corporate, comparative source table SRC and target table DST: (1) Source Table SRC records records in Target Table DST DST Add to Delete Marker Write Query DELETESQL = 'SELECT 2 AS AOWSTATA, DST. * From DST Right Join SRC ON (DST. All fields = src. All fields) WHERE SRC. The first field is null '; (2) Target table SRC records recorded in the source table DST does not exist in the new marker write query INSERTSQL = 'SRECT 4 AS AOWSTATA, SRC. * From Src Left Join Dst on (src. All fields = DST. All fields) WHERE DST. The first field is null'; (3) Top two query results with provider .GetRecords gives an Olevariant, converted to string to write XML files: Delete contact, then combined with two XML files, then "AowStata" is "RowState". Get a data patch (XML file). (4) Data patch (XML file) One line is (b) on the client, After receiving the data patch (XML file), the source table SRC is used to do the following: (1) Data patch (XML file) is read as String, and converted to Olevariant. (2) Source Table SRC corresponding to the provikeUpdates () method .

转载请注明原文地址:https://www.9cbs.com/read-109136.html

New Post(0)