See Also: Implementing Callback Functions, Structure_Abort, Structure_Start
Commits a structure operation, performing restructure on the table data if necessary.
Structure_End tableNum [restructureOptions [tempDir [callBackObject]]]
tableNum
The variable containing the number of the table (or handle returned by Structure_Start, for a new table) on which a Structure_Start command has been done.
restructureOptions
Options (listed below) which determine how the command behaves.
tempDir
A temporary folder to be used when not restructuring in-place. This defaults to the folder where the table being restructured resides.
callBackObject
The ID of the object to receive callback during the restructure operation. The first parameter of callback should be a string containing progress information.
This command completes a structure block begun with Structure_Start.
Structure_End hTable DF_STRUCTEND_OPT_NONE
This example ends the structure on the File with number hTable, setting no options.
The restructureOptions listed below are peculiar to the DataFlex database driver. The available restructureOptions are as follows:
DF_STRUCTEND_OPT_NONE - sets no options
DF_STRUCTEND_OPT_FORCE - will force a restructure even if one is not needed.
DF_STRUCTEND_OPT_RECOMPRESS - force the rebuilding of the custom compression grid and recompression of data in a table that uses custom compression.
DF_STRUCTEND_OPT_IN_PLACE - this option will perform the restructure in place. The tempDir parameter will be ignored. Note that this option is only a suggestion—if it can be done in place, it will be.
These options can be combined by using the ior operator.
Structure_End closes the table tableNum.
After a restructure, tableNum contains a table handle rather than the table number it was passed before the restructure. Therefore, an open tableNum statement after a restructure will return an error (or open the wrong table). It is good practice either to create a separate variable to pass to Structure_Start for tableNum or to perform restructures in procedures that use a local variable for the parameter.