Partilhar via


MaximumStringLength Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets the value in the MaximumStringLengthColumn column of the CatalogPropertiesDataSet..::.CatalogPropertiesDataTable table.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Property MaximumStringLength As Integer
'Usage
Dim instance As CatalogPropertiesDataSet..::.CatalogProperty
Dim value As Integer

value = instance.MaximumStringLength

instance.MaximumStringLength = value
public int MaximumStringLength { get; set; }
public:
property int MaximumStringLength {
    int get ();
    void set (int value);
}
public function get MaximumStringLength () : int
public function set MaximumStringLength (value : int)

Property Value

Type: System..::.Int32
The value from the MaximumStringLengthColumn column of the CatalogPropertiesDataSet..::.CatalogPropertiesDataTable table.

Remarks

DataSet: CatalogPropertiesDataSet Table: CatalogProperties Column: MaxLength.

Examples

// Creates a property of the data type string and also specifies the maxlength.
internal CatalogProperty CreateProperty(string propertyName, CatalogDataType catalogDataType, int maxLength)
{
  CatalogProperty property = null;
  try
  {
    property = catalogContext.CreateProperty(propertyName, catalogDataType, maxLength);
  }
  // The property name is not valid
  catch (ValidationException ex)
  {
    Console.WriteLine(ex.Message);
  }
  // The Property already exists
  catch (EntityAlreadyExistsException ex)
  {
    string message = string.Format("The property {0} already exists", ex.EntityName);
    Console.WriteLine(message);
  }
  return property;
}

Permissions

See Also

Reference

CatalogPropertiesDataSet..::.CatalogProperty Class

CatalogPropertiesDataSet..::.CatalogProperty Members

Microsoft.CommerceServer.Catalog Namespace