Executing a Batch Move
[Previous] [Main] [Next]

The BatchMove component is a powerful and flexible way to transfer records from and to different data sources. You can use different flat files and all VCL data sets as data sources.

To execute a batch move :

1.Set the TdbTable property to the TTdbTable component where you want to import from or to export to.  
 
2.Set the FileName or the DataSet property to the file or the data set of the other data source.  
 
3.If the other data source is a file, set the FileType property according to the file format of the other data source.  
 
4.If the other data source is a text file (i.e. FileType has been set to tffSDF), set Quote, Separator and ColumnNames to the appropriate values.  
 
5.If the other data source is a text file or a dBase file, set CharSet to the appropriate value.  
 
6.Set the Direction property to bmdImport, if you want to transfer records from the other data source into the TurboDB table. Set it to bmdExport, if you want to create a file with records of your TurboDB table.  
 
7.Set the Mode property to the kind of batch move you want to perform.  
 
8.Add the column mappings between the source and target to the Mappings property.  
 
9.Set the Filter property to restrict the import or export to a subset of the source data set.  
 
10.Register an event handler for the OnProgress event to show the progress of the batch move process and to offer the user a way of interrupting the operation.  
 
11.Call the Execute method to start the batch move.