IProduct3::get_RelatedProducts Property [C++]
The RelatedProducts property is a read-only Recordset object that contains the names of products that are related to this product.
Definition
[C++]
HRESULT IProduct3::get_RelatedProducts(_Recordset**RelatedProducts);
[Visual Basic]
Property RelatedProducts As Recordset
Parameters
- RelatedProducts[C++]
[out, retval] A _Recordset object used to return the related products.
[Visual Basic] None.
[C++]
Return Values
This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
Error Values
[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
[Visual Basic] This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
The following table describes the custom COM errors this method can return.
Constant | Value | Description |
---|---|---|
E_CAT_INVALID_RS_POINTER | [C++] 0x889800B7 [Visual Basic] &H889800B7 |
The recordset pointer that you specified is invalid. |
Remarks
[C++] The RelatedProducts parameter contains valid data only if the property was accessed successfully.
[Visual Basic] The RelatedProducts property contains valid data only if it was accessed successfully.
The recordset returned contains one row for each relationship present.
The returned recordset contains the fields listed in the following table.
Field | Data Type | Description |
---|---|---|
ProductID | String Maximum of 128 characters |
The unique product identifier in the target catalog. |
RelationshipName | String Maximum of 128 characters |
Name of the relationship. |
RelationshipDescription | String Maximum of 128 characters |
Description of the relationship in the current language of the catalog. |
TargetCatalog | String Maximum of 100 characters |
Name of the catalog containing the related product. |
Important
- The ProductID field in the returned recordset is not same as the <defined ProductID field> used in this recordset in Commerce Server 2000. If you are upgrading a Commerce Server 2000 application you may need to modify your code to accept a String data type.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
See Also
[C++]Product Object
[Visual Basic]Product Object
[C++]IProduct3::AddRelatationshipToProduct
[Visual Basic]Product.AddRelatationshipToProduct
[C++]IProduct3::SetRelatedProducts
[Visual Basic]Product.SetRelatedProducts
Copyright © 2005 Microsoft Corporation.
All rights reserved.