Navigation:  Classes > bArrayServer >

bArrayServer:CopyStructure()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Create a DBF file with the same field structure as the ArrayServer.

Class

bArrayServer

Type

Method

Syntax

<oArrayServer>:CopyStructure(

<oFSTarget> | <cTarget>,

[<aiField> | <acField> | <asymField> | <aoDFField>],

[<cDriver>],

[<acRDD>]

) Æ lSuccess

Arguments

<oFSTarget>A file path as FileSpec. The DBF file is created to this path.
Data type:FileSpec

 

<cTarget>A file path as string. The DBF file is created to this path.
Data type:String

 

<aiField>An array of field numbers. The fields define the field structure of the DBF file. If omitted, all fields of the ArrayServer are used.
Data type:Array

 

<acField>An array of field names as string. The fields define the field structure of the DBF file. If omitted, all fields of the ArrayServer are used.
Data type:Array

 

<asymField>An array of field names as symbol. The fields define the field structure of the DBF file. If omitted, all fields of the ArrayServer are used.
Data type:Array

 

<aoDFField>An array of DataField objects. The fields define the field structure of the DBF file. If omitted, all fields of the ArrayServer are used.
Data type:Array

 

<cDriver>The name of the RDD which is used for the DBF file. If not specified, the default RDD as determined by RDDSetDefault() is used.
Data type:String

 

<acRDD>An array with the names of RDD which are used for the DBF file in addition to the main RDD. If omitted, no additional RDD are used.
Data type:Array

Return Value

lSuccessA logical value indicates whether the DBF file was created.
TRUEThe DBF file was created.
FALSEThe DBF file could not be created.
Data type:Logic

Description

bArrayServer:CopyStructure() create a empty DBF file from an ArrayServer. If the file already exists, then it is overwritten. The directory path for the file must already exist. It is not created automatically.

 

If argument 2 is not passed then the DBF file is created with all fields of the ArrayServer.

 

When creating the DBF file only fields which are of the data type "C", "D", "L", "M" or "N" are used. Fields of other data types are ignored. Furthermore the field names are adapted from DBF field names. None alpha numeric characters in the field names are replaced by the character "_". Long field names be cut of on 10 characters. If double field names arise from it, then the field name is cut of on 7 characters and an ascending serial number is added.

See Also

bArrayServer:CopyDB()

bArrayServer:CopyDelimited()

bArrayServer:CopySDF()

bArrayServer:CopyToFile()

 


Page url: http://www.YOURSERVER.com/index.html?barrayserver_copystructure.htm