Path: String;
The Path property determines the path to directory with Paradox tables, from which data is imported.
Executing the example requires that the repository contains an ETL task with the Etl identifier, and the Paradox table Table_1.Db in the disk C root directory.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
EtlTask: IEtlTask;
EtlProvider: IEtlPlainDataProvider;
ParadoxProvider: IDtParadoxProvider;
WxProvider: IWxRectangle;
WxETLProvider: IWxETLObject;
Begin
MB := MetabaseClass.Active;
//ETL task search. Repository object with the ETL identifier
MObj := MB.ItemById("Etl").Edit;
EtlTask := MObj As IEtlTask;
//Start of the provider creation
//The Import From Paradox object creation
EtlProvider := EtlTask.Create(EtlObjectType.PlainDataParadoxProvider) As IEtlPlainDataProvider;
EtlProvider := EtlProvider.Edit;
EtlProvider.Id := "Paradox_Provider";
EtlProvider.Name := "Import from Paradox";
EtlProvider.Description := "Import from Paradox";
//Set up data provider
ParadoxProvider := EtlProvider.Provider As IDtParadoxProvider;
ParadoxProvider.DriverVersion := "Paradox 7.X";
ParadoxProvider.Path := "c:\";
ParadoxProvider.Query := "Select * from Table_1";
EtlProvider.FillDefault;
//Save provider
EtlProvider.Save;
//End of provider creation
//Start of visual object creation
WxProvider := EtlTask.Workspace.CreateRectangle;
WxETLProvider := New WxETLObject.Create;
WxETLProvider.ETLObject := EtlProvider;
WxProvider.Style.TextPosition := WxTextPosition.Bottom;
WxProvider.Style.PictureMarginTop := -10;
WxProvider.PinPosition := New GxPointF.Create(50, 50);
WxProvider.Extension := WxETLProvider As IWxShapeExtension;
//End of visual object creation
//Save Etl task
MObj.Save;
End Sub Main;
After executing the example the Import from Paradox object is created in the ETL task. The provider imports data from the Base_1.Dbf table. During connection the Paradox 7.X drivers are used.
See also: