Hello,
Using UniDAC 7.0.2.
As far as I know TCRBatchMove identify primary key in a TDataSet automatically. I would like to know if there is any way to provide primary key columns manually.
I am using TCRBatchMove between two detail tables. Both detail table's primary key is set on an autoincrement column. I would like to define TCRBatchMove to use two columns where second column is master link column. This will help me get rid of wrong append/update of records between source and destination because of different autoincrement column values in a multi-user environment.
Thanks.
TCRBatchMove workaround
Re: TCRBatchMove workaround
TCRBatchMove does not allow setting custom values for IDENTITY fields. For the issue solution, you can use TUniloader. In order for TUniloader to pass values of a primary key from a source table to the IDENTITY field of a destination table, set TUniLoader.SpecificOptions.Values['SQL Server.KeepIdentity'] to True. For data loading use the TUniLoader.LoadFromDataSet method.
More details about KeepIdentity: https://www.devart.com/unidac/docs/?sql ... tuniloader and TUniLoader: https://www.devart.com/unidac/docs/?dev ... loader.htm
More details about KeepIdentity: https://www.devart.com/unidac/docs/?sql ... tuniloader and TUniLoader: https://www.devart.com/unidac/docs/?dev ... loader.htm