IPredictorServiceSiteAdmin2::GenerateSegmentList Method [C++]

Use this method to generate a list of the members of a segment.

Definition

[C++]

HRESULT IPredictorServiceSiteAdmin2::GenerateSegmentList(
BSTRsLMConn,
  BSTRsTableName,
  BSTRsModelName,
  BSTRsSegmentNamedoublefpMinProbability);

[Visual Basic]

Sub GenerateSegmentList(sLMConn As String,
  sTableName As String,
  sModelName As String,
  sSegmentName As StringfpMinProbabilityAs Double)

Parameters

  • sLMConn[C++]
    [in] A BSTR that specifies the connection information for the ListManager object.
  • sLMConn[Visual Basic]
    A String that specifies the connection information for the ListManager object.
  • sTableName[C++]
    [in] A BSTR that specifies the name of the table to store the list of segment members.
  • sTableName[Visual Basic]
    A String that specifies the name of the table to store the list of segment members.
  • sModelName[C++]
    [in] A BSTR that specifies the name of the segment model to use.
  • sModelName[Visual Basic]
    A String that specifies the name of the segment model to use.
  • sSegmentName[C++]
    [in] A BSTR that specifies the name of the segment to export.
  • sSegmentName[Visual Basic]
    A String that specifies the name of the segment to export.
  • fpMinProbability[C++]
    [in] A double that specifies the minimum probability associated with a segment member for that member to be exported. The valid range is between 0 and 1.
  • fpMinProbability[Visual Basic]
    A Double that specifies the minimum probability associated with a segment member for that member to be exported. The valid range is between 0 and 1.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the following Error Values section for more details.

[Visual Basic] None.

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 method 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.

Remarks

[C++] This method is provided for use by the ListManager object and should not be called independently. The CreateFromSegment method of the ListManager object calls this method and creates the list. For more information, see IListManager::CreateFromSegment.

[Visual Basic] This method is provided for use by the ListManager object and should not be called independently. The CreateFromSegment method of the ListManager object calls this method and creates the list. For more information, see ListManager.CreateFromSegment.

Passing an empty string for the model name results in an empty list.

If the segment name, sSegmentName, does not exist or is the name of a segment group, an empty list is generated. No error is returned for this case.

Connect to the Data Warehouse using the Init method before calling the GenerateSegmentList method.

A segment model classifies groups of users into segments of users with similar user properties. Similar segments are further grouped into higher order collections of segments.

Each user is assigned a probability of membership to each segment. The sum of the probabilities for all segments equals one for the user. If the probability of membership in a particular segment for the user is greater than fpMinProbability, the user will be included in the export list.

All members (individual cases) of the specified segment level with an associated probability greater than the value specified in the fpMinProbability attribute are stored in the named table, and then exported into the List Manager.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[Visual Basic]

Example

oPredictorServiceSiteAdmin.GenerateSegmentList _
 "Provider=SQLOLEDB;Data Source=servername;" & _
 "Initial Catalog=Retail_commerce;Integrated Security='SSPI';", _
 "TeenAgers", "Demog1", "TeenAgers", .5

See Also

[C++]PredictorServiceAdmin Object

[C++]PredictorServiceSiteAdmin Object

[C++]PredModelBuilder Object

[Visual Basic]PredictorServiceAdmin Object

[Visual Basic]PredictorServiceSiteAdmin Object

[Visual Basic]PredModelBuilder Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.