IDtVfpConsumer.Path

Syntax

Path: String;

Description

The Path property determines the path to database or directory with free Visual Foxpro tables.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier and the Visual Foxpro Data.dbc database in the root of the C disk. There is the Table_1 table in the database.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    EtlTask: IEtlTask;
    EtlConsumer: IEtlPlainDataConsumer;
    VfpConsumer: IDtVfpConsumer;
    WxConsumer: IWxRectangle;
    WxETLConsumer: 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 data provider creation
    // Create the "Export to Visual Foxpro" object
    EtlConsumer := EtlTask.Create(EtlObjectType.PlainDataVfpConsumer) As IEtlPlainDataConsumer;
    EtlConsumer := EtlConsumer.Edit;
    EtlConsumer.Id := "Vfp_Consumer";
    EtlConsumer.Name := "Export to Visual Foxpro";
    EtlConsumer.Description := "Export to Visual Foxpro";
    // Set up data source
    VfpConsumer := EtlConsumer.Consumer As IDtVfpConsumer;
    VfpConsumer.Path := "c:\Data.dbc";
    VfpConsumer.Table := "Table_1";
    EtlConsumer.FillDefault;
    // Save data provider
    EtlConsumer.Save;
    // End of data provider creation
    // Start of visual object creation
    WxConsumer := EtlTask.Workspace.CreateRectangle;
    WxETLConsumer := New WxETLObject.Create;
    WxETLConsumer.ETLObject := EtlConsumer;
    WxConsumer.Style.TextPosition := WxTextPosition.Bottom;
    WxConsumer.Style.PictureMarginTop := -10;
    WxConsumer.PinPosition := New GxPointF.Create(5050);
    WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;
    // End of visual object creation
    // Save ETL task
    MObj.Save;
End Sub UserProc;

After executing the example the Visual Foxpro object is created in the ETL task. This data provider exports data to the Foxpro table named Data.

See also:

IDtVfpConsumer