Navigation:  Reference > Functions >

CreateDBF()

Print this Topic Previous pageReturn to chapter overviewNext page

 

CREATE_DBF(1,2,3)

 

PURPOSE

This function will create a standard CodeBase (DBF) file based on entries in the data dictionary.

 

PARTS

 

1 f/c/eRequired - The file to create.  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 'C  ' (C+2 spaces).  You may either include the complete company code (C+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.

 

3 f/c/eIf the file you are trying to create already exists you may want to alert the user to that before it is initialized.  If so, make this value 'Y' or .T.  The default value is .F. which means the user won't be notified if the file exists.

 

RETURN TYPE - L

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

 

COMMENTS

This function will do all that is necessary to create a DBF file at the proper location.  The appropriate record must already exist in FILELOC before this process will work properly.

 

NOTE:  If you are converting from a previous version of TAS Professional you must run DBF_FLDS.RWN before you can create DBF files.  This will create the entries in FILEDBF that are required before DBF files can be created.

 

SEE ALSO

ConvertToDBF() co() Create_Btrv()

 

Example

define table type a size 20

define dummy_l type L 

table = 'myfile'

    dummy_l = Create_DBF(table,'B'*co(),.f.)

    if .n. dummy_l

      msg 'Error Creating new '+ table*'  Table'

    endif

 

 

 


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