Code to Join an External Table to Product Recordsets

If you have data that does not fit naturally into the Product Catalog System or that you are already managing separately, you can join a table or view of that data to the product recordsets returned by methods in the Product Catalog System.

Using the CatalogManager.SetJoinTable method, you can specify an external table or view, the join keys, and the type of join. Subsequent calls to the following methods will return the results of the specified join:

The following code shows how to set a join with an external table:

' oCatalogManager is CatalogManager object.
' sTargetTable is a string containing the name of the external table.
' This could be a table containing inventory of the products in the
' product catalog.  For example, sTargetTable = "ProductInventory"
' sSourceKey is a string containing the name of the key in product 
' catalog.  For example, sSourceKey = "ProductID"
' sTargetKey is a string containing the name of the key in the external 
' table.  For example, sTargetKey = "ProductCode"
' eJoinType is a enumeration value to specify the join type.  For 
' example, eJoinType = cscOuterJoin

' Call SetJoinTable to specify the external table to join with.
oCatalogManager.SetJoinTable(sTargetTable, _
                             sSourceKey, _
                             sTargetKey, _
                             eJoinType)
' Calling the above methods after calling SetJoinTable() will join the 
' results of that method with external table specified

Copyright © 2005 Microsoft Corporation.
All rights reserved.