‎21-08-2024 08:50 AM
Hello,
I've got to create a mapping for a database via a VB script. I am able to make the mapping, but I still have to link this mapping to that particular database:
I cannot find the objects with these left and right root mapped elements:
set oMapType = myRoot.GetSelection("Select [_MappingType] where name = " & DQ & "Logical/Physical" & DQ)
'MyRoot.MessageBox oMapType.count, "Mapping Type"
if oMapType.count = 1 then
set iMapType = oMaptype(1)
set aDuplicateObject = iMapType.Getcollection("Mapping").add("Mapping of " & DBName)
'... --> here we should add code to link the left and right mapped elements
end if
Can anyone help me how to retrieve these objects?
tnx,
Jeroen
Solved! Go to Solution.
‎29-08-2024 07:50 AM
It was as simple as that... except 1 small addition, I had to add the 'add'-command to the line...
set MappedItem = aDuplicateObject.GetCollection("Left Root Mapped Element").add(objMega)
set MappedItem = aDuplicateObject.GetCollection("Right Root Mapped Element").add(objMega)
‎26-08-2024 02:30 AM
Jeroen,
It should be as simple as
set aLeftMap = aDuplicateObject.GetCollection("Left Root Mapped Element").Item(1)
(though you should use the absolute identifier of the end point, and check for the number of items in the collection)
Kenneth