Loading TMSTableData`s Records from a DetaSet

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Mahmood_M
Posts: 20
Joined: Thu 24 Sep 2015 21:18

Loading TMSTableData`s Records from a DetaSet

Post by Mahmood_M » Thu 19 Oct 2017 14:25

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 ?

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Loading TMSTableData`s Records from a DetaSet

Post by Stellar » Thu 26 Oct 2017 09:02

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

Post Reply