IExpressionStore::GetExpression

Ee784367.c++_off(en-US,CS.10).gifEe784367.vb_on(en-US,CS.10).gif

Use this method to retrieve an ADO hierarchical Recordset object that contains the specified expression.

Definition

HRESULT IExpressionStore::GetExpression(longnExprID,_Recordset**ppRSExpr);

Parameters

nExprID

[in] A long that contains the unique identifier of the expression.

ppRSExpr

[out, retval] An address of a pointer to an ADO hierarchical Recordset object that contains the expression.

Return Values

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details. If the method does not complete successfully, the address of the pointer to the Recordset object is set to NULL.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT 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_EXPR_BADCONNECTION 0x8110001F Invalid connection
E_EXPR_BADEXPRID 0x8110000A Invalid expression ID specified, or expression ID not found in store
E_EXPR_NOCONNECTIONSTRING 0x8110000D No connection string specified

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

To access all expressions in the connected expression store, use the GetAllExprs method.

Call the Connect method before calling the GetExpression method.

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

The ppRSExps parameter contains valid data only if the method completes successfully.

See Also

Expression Recordset

ExpressionStore Object

IExpressionStore::Connect

IExpressionStore::GetAllExprs

IExpressionStore::NewExpression


All rights reserved.