Click or drag to resize

DbServer.CopyStructure Method (String, Array)

X#
Create a DBF file with the same record layout as the server object to which the message is sent.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD CopyStructure(
	cFileName AS STRING,
	 aFieldList AS ARRAY
) AS LOGIC
Request Example View Source

Parameters

cFileName
Type: String
The file to which the record is copied.
aFieldList
Type: Array
An array of fields that are to be included in the records to be copied.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyCompletion message, if successful.
This method does not open the new file; it simply creates the file on disk. If you want to open it afterwards, you simply instantiate it directly.
Examples
The example below creates the file and instantiates it to open it.
X#
1IF oDB1:CopyStructure(oFSTarget)
2oDB2 := DBServer{oFSTarget}
3ELSE
4...
5ENDIF
See Also