Click or drag to resize

DbServer.CopyStructure Method (FileSpec, 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.19
Syntax
 VIRTUAL METHOD CopyStructure(
	oFSTarget AS FileSpec,
	 aFieldList AS ARRAY
) AS LOGIC
Request Example View Source

Parameters

oFSTarget
Type: FileSpec
A filespec object that specifies 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