Structure_End
See Also: Implementing Callback Functions, Structure_Abort, Structure_Start
Purpose
Commits a structure operation, performing restructure on the table data if necessary.
Syntax
Structure_End
tableNum
[
restructureOptions
[
tempDir
[
callBackObject
]
]
]
Argument Explanation
-
tableNum
The variable containing the number of the table (or handle returned byStructure_Start, for a new table) on which aStructure_Startcommand has been executed. -
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 a callback during the restructure operation. The first parameter of the callback should be a string containing progress information.
What It Does
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
Forces a restructure even if one is not needed. -
DF_STRUCTEND_OPT_RECOMPRESS
Forces the rebuilding of the custom compression grid and recompression of data in a table that uses custom compression. -
DF_STRUCTEND_OPT_IN_PLACE
Performs the restructure in place. ThetempDirparameter 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.
Notes
-
Structure_Endcloses the tabletableNum. -
After a restructure,
tableNumcontains a table handle rather than the table number it was passed before the restructure. Therefore, anopen tableNumstatement after a restructure will return an error (or open the wrong table). It is good practice either to create a separate variable to pass toStructure_StartfortableNumor to perform restructures in procedures that use a local variable for the parameter.