Export (0) Print
Expand All

CatalogContext.SetJoinTable (String, String, String, CatalogJoinType) Method (BCL)

Commerce Server 2002

Use this method to set the join table information. The join information is in effect for the lifetime of the CatalogContext object.

For a list of the methods that support the JoinTable feature, see Code to Join an External Table to Product Recordsets.

[Visual Basic .NET]
Public Sub SetJoinTable( _
  ByVal targetTableName As System.String, _
  ByVal sourceJoinKey As System.String, _
  ByVal targetJoinKey As System.String, _
  ByVal joinType As CatalogJoinType _
) 
[C#]
public void SetJoinTable(
  System.String targetTableName,
  System.String sourceJoinKey,
  System.String targetJoinKey,
  CatalogJoinType joinType
);

Parameters

[Visual Basic .NET]
targetTableName
The target table. May not be null.
sourceJoinKey
The source join key name. May not be null.
targetJoinKey
The target join key name. May not be null.
joinType
The CatalogJoinType enumeration value. See the Remarks section for possible values.
[C#]
targetTableName
The target table. May not be null.
sourceJoinKey
The source join key name. May not be null.
targetJoinKey
The target join key name. May not be null.
joinType
The CatalogJoinType enumeration value. See the Remarks section for possible values.

Return Value

This method returns void.

Remarks

When the default CatalogContext object is initialized it will set the join table information. You can use SetJoinTable method or the joinTable tag in the web.config file to change join table information. For more information about the joinTable tag, see catalog Tag.

You can create two CatalogContext objects and set different join tables for both of them using the SetJoinTable method. Joins can be performed with multiple tables, but only one table can be joined at a time. The API must be called several times to complete this operation. You cannot perform multiple joins using multiple tags in the web.config file, this can only be done using the SetJoinTable method. As long as the column names in the join table are not the same as the column names in the catalog tables you can specify columns from your join table in the targetJoinKey parameter.

If you pass a parameter containing spaces to the SetJoinTable method, that parameter must be enclosed by square brackets([]).

The following table lists the possible values for the CatalogJoinType enumeration.

TypeDescription
InnerJoinReturns rows only where the keys are equal.
OuterJoinLeftReturns all rows in the Product Catalog System and matching rows in the target table.
OuterJoinRightReturns matching rows in the Product Catalog System and all rows in the target table.
OuterJoinFullReturns all rows in both tables.
NoJoinDoes not perform a join.

Throws an ArgumentNullException if any of the three string parameters are null. Throws a CommerceException on failure.

Requirements

Namespace: Microsoft.CommerceServer.Runtime.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Runtime.dll

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft