OrderGroup.Initialize

Ee826082.c++_on(en-US,CS.10).gifEe826082.vb_off(en-US,CS.10).gif

Use this method to initialize the OrderGroup object.

Definition

Sub Initialize(strConnectionString As String,strUser ID As String)

Parameters

strConnectionString

A String that contains the database connection string.

strUser ID

A String that specifies the user ID. All Commerce Server 2000 user ID values are GUIDs.

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

Use this method to specify the connection string that the OrderGroup uses for its database operations. You also specify a user_id that the object will use as an OrderGroup_id when performing basket operations. This same user_id value will be stored in the g_User IDChangedBy field.

Ee826082.note(en-US,CS.10).gif Note

  • If you are loading an OrderGroup on behalf of another user (for example as an administrator), you should specify the administrator user ID (or a placeholder user ID GUID which signifies administrative authority) so that g_UserDChangedBy is updated with the appropriate value when the OrderGroup is saved back to the database. If you wish to load an OrderGroup with a Basket status in the role of an administrator, you must specify strUser ID as the user ID of the user whose basket you wish to load. In this case g_User IDChangedBy will not be updated with an administrator user ID.

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

Example

' oOrderGrp is a Commerce.OrderGroup object
' sConnString is a valid connection string to the Commerce database
oOrderGrp.Initialize(sConnString, _
    "{D4F9C9CC-C33E-11D0-B8A0-00C04FB616C7}")

See Also

OrderGroup Object


All rights reserved.