cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Metawizard / Database / Unable to set the Target DBMS

jpots
Super Contributor

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 !!

2 Replies

jpots
Super Contributor
Hi Lionel, thank you for your response although it is not what I was hoping for 😉 Since we have a good solution with a toolcreator we don't have a problem for the moment, but as you said they don't work with webclients and since that's the future for Hopex/Mega it would be a good thing that in a future release this would be possible.

lionel
MEGA
MEGA

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