IPredModelBuilder::Start Method [C++]

Use this method to create a new model build thread.

Definition

[C++]

HRESULT IPredModelBuilder::Start(BSTRsDWConnStr,
  BSTR sSiteName,
  BSTRsConfigName,
  BSTRsModelName,
  BSTRsXMLBuildParams,
  VARIANT_BOOL bOverWrite,
  long*plBuildID);

[Visual Basic]

Function Start(sDWConnStr As String,
  sSiteName As String,
  sConfigName As String,
  sModelName As String,
  sXMLBuildParams As StringbOverWrite As Boolean) As Long

Parameters

  • sDWConnStr[C++]
    [in] A BSTR that contains the connection information for the data warehouse.
  • sDWConnStr[Visual Basic]
    [in] A String that contains the connection information for the data warehouse.
  • sSiteName[C++]
    [in] A BSTR that contains the site name.
  • sSiteName[Visual Basic]
    [in] A String that contains the site name.
  • sConfigName[C++]
    [in] A BSTR that contains the model configuration name.
  • sConfigName[Visual Basic]
    [in] A String that contains the model configuration name.
  • sModelName[C++]
    [in] A BSTR that contains the model name.
  • sModelName[Visual Basic]
    [in] A String that contains the model name.
  • sXMLBuildParams[C++]
    [in] A BSTR that contains the run-time build parameters for the model in XML format.
  • sXMLBuildParams[Visual Basic]
    [in] A String that contains the run-time build parameters for the model in XML format.
  • bOverWrite[C++]
    [in] A VARIANT_BOOL that indicates whether to overwrite the model if it already exists.
  • bOverWrite[Visual Basic]
    [in] A Boolean that indicates whether to overwrite the model if it already exists.
  • plBuildID[C++]
    [out, retval] A pointer to a long that contains the identifier for the new build thread.

Return Values

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

[Visual Basic] If this method completes successfully, it returns a Long that contains the identifier for the new build thread.

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.

The following standard COM error value has a particular meaning in the context of this method.

E_FAIL

The overwrite flag is False, and the specified model already exists or the build thread failed.

Remarks

Ee809980.note(en-US,CS.20).gifNote

  • The PredModelBuilder object is limited to one thread per server. If you attempt to start another thread the method will fail.

For information on the run-time build parameters contained in the sXMLBuildParams parameter, see PredictorModels Table. The sXMLBuildParams parameter must be passed in as the return value of the SaveXML method of the IPersistXML interface of a Dictionary object containing the build parameters. For an example of this technique, see Code to Build a New Model.

Connect to the data warehouse to access the model configuration.

Associating the site name with the PredModelBuilder object allows logging of performance monitoring counters to be aggregated over the site. See the PredictorClient object for more information.

Use the returned identifier for all subsequent access to the build thread.

If a model with the same name already exists and the overwrite parameter is False, the Start method fails.

The priority of a build thread may be set using the Priority property.

Use the Status property to check the status of a build thread.

Use the Stop method to stop a build thread that is currently running. A stopped thread may not be resumed. The thread must be restarted with the Start method.

Use the Pause method to temporarily suspend the execution of a build thread. Use the Resume method to resume execution of the suspended thread.

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

[C++]

The plBuildID parameter contains valid data only if the method completes successfully.

[Visual Basic]

Example

' lBuildID is a Long

lBuildID = oPredModelBuilder.Start _
("Provider=SQLOLEDB;Data Source=servername;" & _
 "Initial Catalog=Retail_dw;Integrated Security='SSPI';", _
 "Retail", "PurchaseCfg1", "Demog1", sXMLBuildParams, False)

See Also

[C++]PredModelBuilder Object

[C++]IPredModelBuilder::Pause

[C++]IPredModelBuilder::Resume

[C++]IPredModelBuilder::Stop

[C++]IPredModelBuilder::get_Status

[C++]IPredModelBuilder::get_Priority, put_Priority

[C++]PredictorClient Object

[Visual Basic]PredModelBuilder Object

[Visual Basic]PredModelBuilder.Pause

[Visual Basic]PredModelBuilder.Resume

[Visual Basic]PredModelBuilder.Stop

[Visual Basic]PredModelBuilder.Status

[Visual Basic]PredModelBuilder.Priority

[Visual Basic]PredictorClient Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.