DriverVersion: String;
The DriverVersion property determines the driver version that is used during connection.
As a value of the property the following values are available:
dBASE III.
dBASE IV.
dBASE 5.0.
Executing the example requires that the repository contains an ETL task with the Etl identifier and the Base_1.Dbf table in the disk C root directory.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
EtlTask: IEtlTask;
EtlConsumer: IEtlPlainDataConsumer;
DbaseConsumer: IDtDbaseConsumer;
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 consumer creation
//The Export To Dbase object creation
EtlConsumer := EtlTask.Create(EtlObjectType.PlainDataDbaseConsumer) As IEtlPlainDataConsumer;
EtlConsumer := EtlConsumer.Edit;
EtlConsumer.Id := "Dbase_Consumer";
EtlConsumer.Name := "Export to Dbase";
EtlConsumer.Description := "Export to Dbase";
//Data consumer setting
DbaseConsumer := EtlConsumer.Consumer As IDtDbaseConsumer;
DbaseConsumer.File := "c:\Base_1.Dbf";
DbaseConsumer.DriverVersion := "dBASE IV";
EtlConsumer.FillDefault;
//Save consumer
EtlConsumer.Save;
//End of consumer 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(50, 50);
WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;
//End of visual object creation
//Save Etl task
MObj.Save;
End Sub Main;
After executing the example the Export to Dbase object is created in the ETL task . The consumer exports data into the Base_1.Dbf table. During connection the dBASE IV drivers are used.
See also: