ExpressionStore.GetExpression

Ee811379.c++_on(en-US,CS.10).gifEe811379.vb_off(en-US,CS.10).gif

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

Definition

Function GetExpression(nExprID As Long) As Object

Parameters

nExprID

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

Return Values

This method returns an ADO hierarchical Recordset object. If successful, the Recordset object contains the specified expression. If unsuccessful, the Recordset object is set to Nothing.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM 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 &H8110001F Invalid connection
E_EXPR_BADEXPRID &H8110000A Invalid expression ID specified, or expression ID not found in store
E_EXPR_NOCONNECTIONSTRING &H8110000D No connection string specified

Additional information may be available using the global Err object. In particular, the Description property may contain 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.

See Also

Expression Recordset

ExpressionStore Object

ExpressionStore.Connect

ExpressionStore.GetAllExprs

ExpressionStore.NewExpression


All rights reserved.