Jaa


CreateVirtualCatalog Method (String, String, String, String, String, DateTime, DateTime)

Creates a new virtual catalog and returns the VirtualCatalog object containing the new catalog.

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

Syntax

'Declaration
Public Function CreateVirtualCatalog ( _
    catalogName As String, _
    defaultLanguage As String, _
    reportingLanguage As String, _
    currency As String, _
    weightMeasure As String, _
    startDate As DateTime, _
    endDate As DateTime _
) As VirtualCatalog
'Usage
Dim instance As CatalogContext
Dim catalogName As String
Dim defaultLanguage As String
Dim reportingLanguage As String
Dim currency As String
Dim weightMeasure As String
Dim startDate As DateTime
Dim endDate As DateTime
Dim returnValue As VirtualCatalog

returnValue = instance.CreateVirtualCatalog(catalogName, _
    defaultLanguage, reportingLanguage, _
    currency, weightMeasure, startDate, _
    endDate)
public VirtualCatalog CreateVirtualCatalog(
    string catalogName,
    string defaultLanguage,
    string reportingLanguage,
    string currency,
    string weightMeasure,
    DateTime startDate,
    DateTime endDate
)
public:
VirtualCatalog^ CreateVirtualCatalog(
    String^ catalogName, 
    String^ defaultLanguage, 
    String^ reportingLanguage, 
    String^ currency, 
    String^ weightMeasure, 
    DateTime startDate, 
    DateTime endDate
)
public function CreateVirtualCatalog(
    catalogName : String, 
    defaultLanguage : String, 
    reportingLanguage : String, 
    currency : String, 
    weightMeasure : String, 
    startDate : DateTime, 
    endDate : DateTime
) : VirtualCatalog

Parameters

  • catalogName
    Type: System..::.String
    The catalog name. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
  • defaultLanguage
    Type: System..::.String
    The culture code indicating the default language for the catalog. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
  • reportingLanguage
    Type: System..::.String
    The reporting language for the catalog. The language to export to the data warehouse.
  • currency
    Type: System..::.String
    The currency for the catalog, expressed as a three letter ISO 4217 currency code. For example, USD< AUD, CDN, GBP, DEM, JPY.
  • startDate
    Type: System..::.DateTime
    The start date for the catalog. The date the catalog is valid.
  • endDate
    Type: System..::.DateTime
    The end date for the catalog. The date the catalog validity expires.

Return Value

Type: Microsoft.CommerceServer.Catalog..::.VirtualCatalog
A VirtualCatalog containing information about the catalog.

Exceptions

Exception Condition
ArgumentNullException

The catalogName or defaultLanguage is nullNothingnullptra null reference (Nothing in Visual Basic).

ValidationException

One of the input parameters is invalid.

EntityAlreadyExistsException

The catalogName already exists in the catalog system.

NotAuthorizedException

The caller is not authorized to perform this operation.

Remarks

The language is specified as a RFC 1766 CultureInfo class name. If nullNothingnullptra null reference (Nothing in Visual Basic), the language defaults to the current user interface culture. The defaultLanguage is the language that appears when you open the catalog to view it or edit it. The reportingLanguage is the language that will appear on reports.

This method creates a new virtual catalog in the catalog system and returns a VirtualCatalog object. You can call methods on the VirtualCatalog object to access and set information on the catalog. If you make changes to the VirtualCatalog object you should call the Save method to save the changes to the catalog system.

The catalogName should:

  • Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.

  • Not exceed 85 characters.

  • Not contain the .,"[]'()# characters.

The defaultLanguage should:

  • Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.

  • Not exceed 10 characters.

  • Not contain the ,'[] characters.

If specified the reportingLanguage should:

  • Not exceed 10 characters.

  • Not contain the ,'[] characters.

If the reportingLanguage is not specified then the reportingLanguage will be the same as the defaultLanguage.

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

CreateVirtualCatalog Overload

Microsoft.CommerceServer.Catalog Namespace