‎25-03-2020 11:01 AM
Hello,
I've created a MetaWizard on the object Database.
I've added 1 metaproperty with 7 database-types we use in our organisation.
Depending on the value of this database-type we auto-fill some of the options (mostly TaggedValues) for a Database, like SQLname, Prefix, Foreign Key, ...
One other 'property' we like to set is its Target DBMS.
I've used similar code as the one use in other macro's (where they work), but within this MetaWizard it doens't link the database to the DBMS:
Sub OnWizTerminate(mwctxManager As MegaWizardContext)
Dim oDB
set oDB = mwctxManager.Template
Dim iDbmsToDelete, aDbmsToDelete
Dim mgRoot
Set mgRoot = mwctxManager.Template.GetRoot
Dim aNull
Dim sTargetdbms
sTargetdbms = oDB.getprop("~dujO09vRUjI7[BEL Target DBMS for Create DB Tool]")
dim oDBMS
Select Case DBMSType
Case "DB2"
oDBMS = mgRoot.GetObjectFromID("D000D0603B4E0011")' DB2 V5
Case "Oracle"
oDBMS = mgRoot.GetObjectFromID("59CF5A06492D000F")' Oracle
end select
set aNull = objMega.GetCollection("~7LmfgYRJx0R0[Target DBMS]").Add(oDBMS)
end sub
Can anyone shine its light on this problem?
tnx !!
‎23-07-2020 06:58 AM
‎22-07-2020 01:18 PM
Hi jpots,
the only way to do this is to use toolcreators instead of metaWizard for your database metaclass.
Unfortunately, toolcreators do not work with web clients, only with windows clients.
I had the same problem and could not figure it out...
I'll make an improvement request to MEGA, but I can't say if it'll be accepted or not.
Lionel