Page 1 of 1

Loading TMSTableData`s Records from a DetaSet

Posted: Thu 19 Oct 2017 14:25
by Mahmood_M
I have a Server and a Client Program, I want to use TVP with SDAC on Server side. A DataSet sends to server from client and I want to add it`s records to a TMSTableData and pass it to a Stored Procedure, but there is no method like TMSTableData.LoadFromDataSet or something like this.

How I can load TMSTableData`s records from another DataSet ?

Re: Loading TMSTableData`s Records from a DetaSet

Posted: Thu 26 Oct 2017 09:02
by Stellar
TMSTableData does not have a method that would allow loading records from another TDataSet. To transfer records between datasets, you can use the TCRBatchMove component. The example of use:

CRBatchMove.Souce := DataSet;
CRBatchMove.Destination := MSTableData;
CRBatchMove.Execute;

More details about TCRBatchMove: https://www.devart.com/unidac/docs/?dev ... chmove.htm