PredictorClient.LoadModelFromDB

Ee784788.c++_on(en-US,CS.10).gifEe784788.vb_off(en-US,CS.10).gif

Use this method to load a model stored in a database.

Definition

Sub LoadModelFromDB(sModelName As String,sDWConnStr As String)

Parameters

sModelName

A String that contains the model name.

sDWConnStr

A String that contains the connection information for the Data Warehouse.

Return Values

None.

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.

Remarks

A valid model must be loaded before calling the other methods of the PredictorClient object. This model, typically in the range of 100k to 10M, must be loaded onto the local Web server to ensure a timely response to a prediction request.

The information for the model is loaded from the PredictorModels table. For more information about this table, see Predictor Schema.

The sDWConnStr parameter must be a SQL OLE DB connection string.

Use the LoadModelFromFile method to load a model from a file.

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

Example

oPredictorClient.LoadModelFromDB "Purchase1", _
 "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=Retail_dw;" _
 & "User ID=user;Password=******;"

See Also

PredictorClient Object

PredictorClient.Predict

PredictorClient.LoadModeFromFile


All rights reserved.