ListManager.Initialize Method (PIA)
Use this method to initialize the ListManager object.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Targeting
…
Public Sub Initialize(bstrConnStr As String,
)
[C#]
using Microsoft.CommerceServer.Interop.Targeting;
…
public void Initialize(stringbstrConnStr,
);
Parameters
[Visual Basic .NET]
- bstrConnStr
A String that contains the connection string for the database to which List Manager will connect.
[C#]
- bstrConnStr
A string that contains the connection string for the database to which the List Manager will connect.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
[Visual Basic .NET]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
&H8C400002 | The ListManager object has already been initialized and may not be re-initialized. |
&H8C400001 | Failed to establish database connection. |
Error while executing SQL/ADO operation. |
[C#]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
0x8C400002 | The ListManager object has already been initialized and may not be re-initialized. |
0x8C400001 | Failed to establish database connection. |
0x8C400003 | Error while executing SQL/ADO operation. |
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, create a new instance of a ListManager object.
[Visual Basic .NET]
Example
oListManager.Initialize ("Provider=sqloledb;" & _
"Data Source=TequillaServer;Initial Catalog=Margaritas;" & _
"Integrated Security='SSPI'")
Requirements
Namespace: Microsoft.CommerceServer.Interop.Targeting
Platforms: Windows 2000, Windows Server 2003
Assembly: listmanagerlib (in listmanagerlib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.