ListManager.Initialize

Ee784634.c++_on(en-US,CS.10).gifEe784634.vb_off(en-US,CS.10).gif

Use this method to initialize the ListManager object.

Definition

Sub Initialize(bstrConnStr As String,)

Parameters

bstrConnStr

A String that contains the connection string for the database to which the List Manager will connect.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_LM_ALREADYINITIALIZED &H8C400002 The ListManager object has already been initialized and may not be re-initialized.
E_LM_CONNECTIONFAILED &H8C400001 Failed to establish database connection.
E_LM_SQLERROR   Error while executing SQL/ADO operation.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

Initialize the ListManager object before calling any other ListManager object method or property.

Initializing connects the ListManager object to a database. If the database does not contain the tables and procedures required by the ListManager object, they are created.

A ListManager object can be connected to only one database. To connect to a different database, instantiate a new ListManager object.

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

Example

oListManager.Initialize "Provider=sqloledb;" & _
 "Data Source=TequillaServer;Initial Catalog=Margaritas;" & _
 "User=userid;Password=******"

See Also

ListManager Object

ListManager.ExportToSQL


All rights reserved.