IGenID::Initialize

Ee784923.c++_off(en-US,CS.10).gifEe784923.vb_on(en-US,CS.10).gif

Use this method to connect the GenID object to the database that stores the table of counters.

Definition

HRESULT IGenID::Initialize(BSTRbstrDBConnectionString,longcBlockSizeHint);

Parameters

bstrDBConnectionString

[in] A BSTR that contains the connection information to the database.

cBlockSizeHint

[in, optional, defaultvalue (1)] Not implemented, leave blank.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

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.

Remarks

This method must be called before calling the GetCounterValue and InitializeCounter methods.

The connection string may be obtained through the SiteConfigReadOnly object or through the Commerce Server Manager console from the connstr_db_Transactions property under Commerce Server Manager\Commerce Sites\<site name>\Site Resources\Transactions.

See Also

GenID Object


All rights reserved.