Syntax
DbCreateFrom( cFile, cFrom, [cRDD], [lNew], [cAlias] ) --> lSuccessArguments
cFile
New database file name.
cFrom
Extended structure file name.
cRDD
Optional RDD name.
lNew
Open the new file in a new work area when true.
cAlias
Optional alias for the new area.
Return value
.T. when the file is created successfully; otherwise .F..
Description
DbCreateFrom() reads an extended structure file and creates a database file with the described fields.
Notes
The structure file must be readable by the selected RDD.
Example
PROCEDURE Main()
DbCreate( "create_from_source.dbf", { { "NAME", "C", 12, 0 }, { "AGE", "N", 3, 0 } } )
DbUseArea( .T., , "create_from_source.dbf", "Source" )
DbCopyXStruct( "people_structure.dbf" )
DbCloseArea()
QOut( "Created: " + IIF( DbCreateFrom( "created_demo.dbf", "people_structure.dbf" ), "YES", "NO" ) )
FErase( "create_from_source.dbf" )
FErase( "created_demo.dbf" )
FErase( "people_structure.dbf" )
RETURNOutput