RDD

DbCopyXStruct()

Save the current table structure in an extended structure file

Syntax

Signature
DbCopyXStruct( cFile ) --> lSuccess

Arguments

cFile

Destination extended structure file.

Return value

.T. when the file is written successfully; otherwise .F..

Description

DbCopyXStruct() writes the structure of the current work area to an extended structure file. The file can later be used by DbCreateFrom().

Notes

No records are copied.

Example

DbCopyXStruct.prg
PROCEDURE Main()

   DbCreate( "xstruct_source.dbf", { { "NAME", "C", 12, 0 }, { "AGE", "N", 3, 0 } } )
   DbUseArea( .T., , "xstruct_source.dbf", "People" )
   QOut( "Extended structure: " + IIF( DbCopyXStruct( "people_structure.dbf" ), "YES", "NO" ) )
   DbCloseArea()
   FErase( "xstruct_source.dbf" )
   FErase( "people_structure.dbf" )


   RETURN

Output

See also