Navigation:  Reference > Functions >

RestructureDBF()

Print this Topic Previous pageReturn to chapter overviewNext page

 

RESTRUCTURE_DBF(1,2)

 

PURPOSE

This function will restructure an existing CodeBase (DBF) file based on entries in the data dictionary.

 

PARTS

1 f/c/eRequired - The file to restructure.  This is the name of the file as currently in FILELOC (locations).

 

2 f/c/eThe company code, if any.  If you don't include a value here the program will use the default company code of 'B  ' (B+2 spaces).  You may either include the complete company code (B+company code) or just the last two characters.

 

       NOTE:  If you specify a company code here there must be a record in FILELOC for this file name and company code.  This is where the program will get the path for the file.

 

RETURN TYPE - L

Returns .T. if the file was restructured properly, .F. if not.

 

COMMENTS

This function will do all that is necessary to restructure the CodeBase (DBF) file.  The appropriate record must already exist in FILELOC before this process will work properly and the file must be of type C.

 

NOTE:  Only fields that are named the same in both the new structure and the current file will be converted.  The names used are the ShortFieldNames.  This means that if you change the ShortFieldName in the structure, save it (in Maintain Data Dictionary) and then restructure the file you may not convert all the fields from the current file to the new.  Make sure you have a backup of the data dictionary (FILE*.DBF and FILE*.MDX) and the file(s) that is (are) being restructured before you start this process.  This is the command that is used in Maintain Data Dictionary when you choose the Restructure process.

 

SEE ALSO

CreateDBF()

 

 


Page url: http://www.cassoftware.com/tas/manual/restructuredbf().htm