Syntax
DbCopyStruct( cFile, [aFields] ) --> lSuccessArguments
cFile
Destination database file.
aFields
Optional list of fields to include.
Return value
.T. when the file is created successfully; otherwise .F..
Description
DbCopyStruct() copies the structure of the current work area into a new, empty database file. Records are never copied.
Notes
The current work area remains open and unchanged.
Example
PROCEDURE Main()
DbCreate( "copy_struct_source.dbf", { { "NAME", "C", 12, 0 }, { "AGE", "N", 3, 0 } } )
DbUseArea( .T., , "copy_struct_source.dbf", "People" )
QOut( "Structure copied: " + IIF( DbCopyStruct( "people_empty.dbf" ), "YES", "NO" ) )
DbCloseArea()
FErase( "copy_struct_source.dbf" )
FErase( "people_empty.dbf" )
RETURNOutput