IDtVfpProvider.Query

Syntax

Query: String;

Description

The Query property determines Visual Foxpro tables query. Imported data is selected by means of the query.

Example

Executing the example requires that the repository contains an ETL task with the Etl identifier, and the Visual Foxpro Data.dbf table in the disk C root directory.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

EtlTask: IEtlTask;

EtlProvider: IEtlPlainDataProvider;

VfpProvider: IDtVfpProvider;

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 source creation

//The Import From Visual Foxpro object creation

EtlProvider := EtlTask.Create(EtlObjectType.PlainDataVfpProvider) As IEtlPlainDataProvider;

EtlProvider := EtlProvider.Edit;

EtlProvider.Id := "Vfp_Provider";

EtlProvider.Name := "Import from Visual Foxpro";

EtlProvider.Description := "Import from Visual Foxpro";

//Data source setting

VfpProvider := EtlProvider.Provider As IDtVfpProvider;

VfpProvider.Path := "c:\";

VfpProvider.Query := "Select * From Data";

EtlProvider.FillDefault;

//Saving the source

EtlProvider.Save;

//End of source 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 Visual Foxpro object is created in the ETL task. The source imports data from the Foxpro table Data.

See also:

IDtVfpProvider