PredModelBuilder.Start

Ee825117.c++_on(en-US,CS.10).gifEe825117.vb_off(en-US,CS.10).gif

Use this method to create a new model build thread.

Definition

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

Parameters

sDWConnStr

[in] A String that contains the connection information for the data warehouse.

sSiteName

[in] A String that is not used. Pass an empty string.

sConfigName

[in] A String that contains the model configuration name.

sModelName

[in] A String that contains the model name.

sXMLBuildParams

[in] A String that contains the run-time build parameters for the model in XML format.

bOverWrite

[in] A Boolean that indicates whether to overwrite the model if it already exists.

Return Values

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

Error Values

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

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.

Example

' lBuildID is a Long

lBuildID = oPredModelBuilder.Start _
("Provider=SQLOLEDB;Data Source=servername;" & _
 "Initial Catalog=Retail_dw;User ID=user;Password=*****;", _
 "", "PurchaseCfg1", "Demog1", sXMLBuildParams, False)

See Also

PredModelBuilder Object

PredModelBuilder.Pause

PredModelBuilder.Resume

PredModelBuilder.Stop

PredModelBuilder.Status

PredModelBuilder.Priority

PredictorClient Object


All rights reserved.