CatalogManager3.SetPropertyAttributes Method (PIA)
Use this method to change the attributes of a property.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ‘ for _Recordset
…
Public Sub SetPropertyAttributes(pRSNewState As _Recordset,
Optional fForceUpdate As Object)
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
using ADODB26Lib; //For _Recordset
…
public void SetPropertyAttributes(_RecordsetpRSNewState,
objectfForceUpdate);
Parameters
[Visual Basic .NET]
- pRSNewState
The _Recordset interface of a Recordset object that specifies the new attribute values. - fForceUpdate
An Object that specifies whether or not to force an update.
[C#]
- pRSNewState
An ADODB26Lib._Recordset interface to a Recordset object that specifies the new attribute values. - fForceUpdate
An object that specifies whether or not to force an update. Set this to Type.Missing to enforce the default behavior.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
The following table describes the COM exceptions that COMException can wrap.
Name | Value | Description |
---|---|---|
E_CAT_CATMGR_NOT_INITIALIZED | [C#] 0x889800B [Visual Basic .NET] &H8898005 |
The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method. |
E_INVALIDARG | [C#] 0x8007005 [Visual Basic .NET] &H8007007 |
One or more arguments are invalid. |
E_CAT_INVALID_RECORDSET | [C#] 0x889800A [Visual Basic .NET] &H889800E |
The recordset you specified is either invalid or empty. |
E_CAT_PROP_DOESNT_EXIST | [C#] 0x8898000 [Visual Basic .NET] &H8898005 |
The property name you specified does not exist. |
E_CAT_CANNOTCHANGE_DATATYPE | [C#] 0x8898010 [Visual Basic .NET] &H889801E |
The datatype of this property cannot be changed. |
E_CAT_INVALID_LANG_ATTRIBUTE | [C#] 0x889800F [Visual Basic .NET] &H8898002 |
The Languagesensitive attribute of this property cannot be changed because this property is being used in one or more catalogs. |
E_CAT_INVALID_ISFREETEXTSEARCHABLE_ATTRIBUTE | [C#] 0x8898003 [Visual Basic .NET] &H889800A |
The attribute IsFreeTextSearchable can be set to only String, FilePath, and Enumeration datatypes. |
E_CAT_INVALID_COLUMN_LENGTH | [C#] 0x8898004 [Visual Basic .NET] &H8898000 |
The length specified for this property does not lie between 1 and 4000. |
E_CAT_PROP_DOESNT_EXIST | [C#] 0x8898000 [Visual Basic .NET] &H8898005 |
The property name you specified does not exist. |
E_CAT_INVALID_PROPERTY_LENGTH | [C#] 0x8898005 [Visual Basic .NET] &H8898007 |
The property you specified is being used as a ProductID or VariantID. You cannot decrease the maximum length of this property or change its data type. |
Remarks
Use a Recordset object returned from either the GetPropertyAttributes method or the CreateProperty method as the pRSNewState parameter so that its time stamp can be compared with the time stamp of the existing property for error detection. You can change all attributes for a property except its data type.
[Visual Basic .NET]
Example
myCatalogManager.SetPropertyAttributes(pRSNewState, True)
Requirements
Namespace: Microsoft.CommerceServer.Interop.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: cataloglib (in cataloglib.dll)
See Also
CatalogManager3.CreateProperty
CatalogManager3.GetPropertyAttributes
Copyright © 2005 Microsoft Corporation.
All rights reserved.