ListManager.CreateEmpty Method (PIA)

Use this method to create an empty list for subsequent operations.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Targeting
…
Public Function CreateEmpty(listName As String,
 listDesc As String,
 flags As Integer,
 userFlags As Integer) As Object

[C#]

using Microsoft.CommerceServer.Interop.Targeting;
…
public object CreateEmpty(stringlistName,
 stringlistDesc,
 intflags,
 intuserFlags);

Parameters

[Visual Basic .NET]

  • listName
    A String that provides the name for the new list.
  • listDesc
    A String that provides a description for the new list.
  • flags
    An Integer that specifies the bitmask flags that control the type of list created.
  • userFlags
    An Integer that contains application-specific user flags. Not used by the ListManager object.

[C#]

  • listName
    A string that provides the name for the new list.
  • listDesc
    A string that provides a description for the new list.
  • flags
    An int that specifies the bitmask flags that control the type of list created.
  • userFlags
    An int that contains application-specific user flags. Not used by the ListManager object.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an Object that contains the ID of the new list.

[C#] This method returns an object used to return the ID of the new list.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

[Visual Basic .NET]

The following table shows the custom COM errors that a COMException can wrap.

Value Description
&H8C400005 Invalid flags value.
&H8C400007 The specified list has already been created.
&H8C400003 Error while executing SQL/ADO operation.
&H80040007 The ListManager object has not been properly initialized.

[C#]

The following table shows the custom COM errors that a COMException can wrap.

Value Description
0x8C400005 Invalid flags value.
0x8C400007 The specified list has already been created.
0x8C400003 Error while executing SQL/ADO operation.
0x80040007 The ListManager object has not been properly initialized.

Remarks

This method is useful for creating an empty list to use as the result list for a copy, subtract, or union operation.

For a list of possible values for the flags parameter, see the GetListFlags method.

[Visual Basic .NET]

Example

' oListID is an Object
oListID = oListManager.CreateEmpty("TequillaBuyers1", _
 "Tequilla buyers in January", 20, 0)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Targeting

Platforms: Windows 2000, Windows Server 2003

Assembly: listmanagerlib (in listmanagerlib.dll)

See Also

ListManager Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.