IPredictorServiceSiteAdmin2::Init Method [C++]

Use this method to initialize the connection to the Data Warehouse.

Definition

[C++]

HRESULT IPredictorServiceSiteAdmin2::Init(BSTRsSiteName,
  BSTRsDWConnStr);

[Visual Basic]

Sub Init(sSiteName As String,
  sDWConnStr As String)

Parameters

  • sSiteName[C++]
    [in] A BSTR that contains the Site name. If it is not supplied only models and model configurations where the site name is unknown in the Data Warehouse will be accessible.
  • sSiteName[Visual Basic]
    A String that contains the Site name. If it is not supplied only models and model configurations where the site name is unknown in the Data Warehouse will be accessible.
  • sDWConnStr[C++]
    [in] A BSTR that contains the Data Warehouse connection string.
  • sDWConnStr[Visual Basic]
    A String that contains the Data Warehouse connection string.

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

The models and model configurations are stored in tables in the Data Warehouse.

Initialize the connection to the Data Warehouse before any other properties or methods of the PredictorServiceSiteAdmin object are called.

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

[Visual Basic]

Example

oPredictorServiceSiteAdmin.Init "Retail", _
 "Provider=SQLOLEDB;Data Source=servername;" & _
 "Initial Catalog=Retail_commerce;Integrated Security='SSPI';"

See Also

[C++]PredictorServiceAdmin Object

[C++]PredictorServiceSiteAdmin Object

[C++]PredModelBuilder Object

[C++]PredictorClient Object

[Visual Basic]PredictorServiceAdmin Object

[Visual Basic]PredictorServiceSiteAdmin Object

[Visual Basic]PredModelBuilder Object

[Visual Basic]PredictorClient Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.