CreateDbVersionTable Tool

See Also: Overview of the DataFlex Database Update Framework


(Obsolete)

Instead of using this tool it is recommended to set the property "pbAutoCreateDbVersionTable" to True in the cDbUpdatehandler object. The DbVersion table will then be created automatically for you when the framework is initialized. (Property was introduced with Version 2.0)


Use the tool "CreateDbVersionTable.exe" to create an embedded "DbVersion" table and a "DatabaseVersion" Numeric 4.2 column to store the current database version. This field/column is automatically updated after a successful run of an cDbUpdateVersion OnUpdate event.


If the installation program was used to install the framework a short-cut in the Studio's Tools menu should already exist. If for some reason the short-cut wasn't created during installation here's what you need to do:


a) Start the program from the DbUpdateFramework Programs folder.

b) Click the "Add to Studio" button, select a DataFlex version and click "Add Now".


If the tool is started from the Studio's Tools menu the Filelist.cfg for the current workspace is automatically loaded.

You can also drag & drop a Filelist.cfg file from e.g. Windows Explorer to the program.


If the tool is placed in a workspace with no "config.ws", you will be presented with an open file dialog to select a workspace .ws file.


When creating a table the first available slot in the Filelist.cfg will be suggested as the Filelist.cfg number. Before the table is created a check is made that a DbVersion table does not already exists in the workspace.


The program is also an example on how the cDbUpdateFunctionLibrary can be used "stand-alone" without using the cDbUpdateHandler class. The source code is included in the DbUpdateFramework AppSrc folder.


Type: Tool/Program


Parameter: String <'WorkspaceName'.sws>

Parameter

Description

<'WorkspaceName'.sws>

The name of the .sws to be opened.




See Also

There is also a SQLCreateDbVersionTable function to convert the embedded table to SQL, but that is not necessary as there can only be one user logged into the system when the table is updated due to the safety mechanisms build into the framework .


Next Topic


The SQLConnections Tool