SDAC Equivalent to BDE TBatchMove Component

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lcoelho
Posts: 47
Joined: Wed 13 Apr 2011 13:41

SDAC Equivalent to BDE TBatchMove Component

Post by lcoelho » Thu 05 May 2011 19:25

Hi,

What is the workaround in SDAC to simulate the BDE TBatchMove component?

Thank you,

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 06 May 2011 07:56

The analogue of TBatchMove is the TCRBatchMove component. Use the TCRBatchMove component to copy server table records to client table or to delete client records that match records in server dataset.
You can find more detailed information about it in the SDAC Help.

lcoelho
Posts: 47
Joined: Wed 13 Apr 2011 13:41

Post by lcoelho » Sun 29 May 2011 13:23

Hi, thank you for the workaround to BDE BatchMove. However, the mode that I particularly need is the BDE's TBatchMove batCopy mode. This mode creates the destination table based on the structure of the source table. If the destination already exists, the operation will delete it, and replace it with the new copy of the source.

With the SDAC TCRBatchMove component, this mode does not exist or is there another property or option that needs to be selected?

Thank you

AndreyZ

Post by AndreyZ » Mon 30 May 2011 10:27

The TCRBatchMove component doesn't have such functionality because it can transfer data between tables from different databases. In this case it's impossible to create tables dynamically. You should create the new table on your own and copy data to it using the TCRBatchMove component.
Also you can use the following code to create a copy of a table on a server:

Code: Select all

MSQuery.SQL.Text := 'select * into tablename_copy from tablename';
MSQuery.Execute;
But note that in this case constraints and indexes are not copied.

Post Reply