ITransactionOptions::SetOptions

OLE DB Programmer's Reference

Sets a suite of options associated with a transaction.

HRESULT SetOptions(    XACTOPT *pOptions);

Parameters

pOptions
[in]
A pointer to an XACTOPT structure containing the options to be set in this transaction. This cannot be a null pointer.
typedef struct XACTOPT {    ULONG           ulTimeout;    unsigned char   szDescription[MAX_TRAN_DESC]; } XACTOPT

The elements of this structure are used as described in the following table.

Element Description
ulTimeout The amount of real time in milliseconds before the transaction is to be aborted automatically. Zero indicates an infinite time-out. If no options have been previously set, ulTimeout is zero.
szDescription A pointer to a textual description associated with this transaction. This string is appropriate for display in various end-user administration tools that might monitor or log the transaction. If no options have been previously set, szDescription is an empty string.

Return Code

S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
pOptions was a null pointer.
E_UNEXPECTED
An unknown error occurred; the method failed.

See Also

ITransactionLocal::StartTransaction | ITransactionOptions::GetOptions

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net