Hello,
Just a follow up on this https://support.dataaccess.com/Forum...491#post324491
In our application we do database structure changes and other kind of operations, for example, update values on each row conditionally to other values on that row (so ApiColumnUpdateValue is not an option).
DUFCodeGenerator is great because you don't have to code the changes, you simply take a "screenshot" and DUF take care of what it is needed to perform the update.
So, my first thought was: we need an event on cDbUpdateVersion called OnPostUpdate.
Later I realized that this is not a good idea because OnPostUpdate is going to be overwriten each time you generate the pkg with DUFCodeGenerator.
What about, when an OnUpdate of cDbUpdateVersion is finished, prior to call the next OnUpdate, launch OnPostUpdate of cDbUpdateHandler with a parameter? Same feature could be added to OnPreUpdate.
Something like this:
Maybe it sounds bad because you are doing specific version tasks at parent object instead of use the version object...Code:Object oDbUpdateHandler is a cDbUpdateHandler Object oDbUpdateVersion1_0 is a cDbUpdateVersion Set pnVersionNumber to 1.0 Procedure OnUpdate // Do some structure table changes End_Procedure End_Object Object oDbUpdateVersion2_0 is a cDbUpdateVersion Set pnVersionNumber to 2.0 Procedure OnUpdate // Do some structure table changes End_Procedure End_Object Use DUF_MultipleTables3_0.pkg Use DUF_MultipleTables4_0.pkg // If nVersion is <= 0 then the wole updates have finished? Procedure OnPostUpdate Number nVersion Case Begin Case (nVersion = 0.0) // The whole update has finished Case Break Case (nVersion = 3.0) // I need to do additional task for version 3.0 Case Break Case End End_Procedure End_Object