Click or drag to resize

DbCopyStruct Function

Create an empty database file with field definitions from another database file.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION DbCopyStruct(
	cFile AS STRING,
	acStruct AS ARRAY := NULL_ARRAY
) AS LOGIC

Parameters

cFile
Type: String
The name of the target database file, including an optional drive, directory, and extension.
acStruct (Optional)
Type: ARRAY
A one-dimensional array of field names to copy to the new database file. The default is all fields.

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
If cFile does not exist, it is created. If it exists, this function attempts to open the file in exclusive mode and, if successful, the file is overwritten without warning or error. If access is denied because, for example, another process is using the file, NetErr() is set to TRUE. DbCopyStruct() creates the specified file in ANSI or OEM character set format, based ON the SetAnsi() setting. (for more information, refer to the SetAnsi() function.)
See Also