ApiTableChangeAttribute - cDbUpdateFunctionLibrary

To change table attributes. Mostly for embedded DataFlex tables.



Type: Function


Parameters: Handle hTable Integer iAttribute Integer iValue

Parameter

Description

hTable

A file handle to the table name. Same as the Filelist.cfg slot number.

iAttribute

Any predefined DataFlex table attribute integer constant. E.g. DF_FILE_IS_SYSTEM_FILE, DF_FILE_REUSE_DELETED etc.

iValue

The corresponding value to an attribute.


Syntax


Function ApiTableChangeAttribute Handle hTable Integer iAttribute Integer iValue

Call:

Get ApiTableChangeAttribute Suppliers.File_Number DF_FILE_REUSE_DELETED DF_FILE_DELETED_NOREUSE to bOK



Description

Use it to change a table API attribute. The file handle is the same as the file number in Filelist.cfg.


Example 1


Object oDbUpdateVersion1 is a cDbUpdateVersion

    Set pnVersionNumber to 1.0

    Procedure OnUpdate

        Boolean bOK

        Get ApiTableChangeAttribute OrdSys.File_Number DF_FILE_IS_SYSTEM_FILE True to bOK

    End_Procedure


End_Object