IExpressionStore::NewExpression
Use this method to return an ADO hierarchical Recordset object that contains an empty expression.
Definition
HRESULT IExpressionStore::NewExpression(_Recordset**ppRSExpr);
Parameters
ppRSExpr
[out, retval] An address of a pointer to an ADO hierarchical Recordset object that contains an empty expression.
Return Values
This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.
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_NOCONNECTIONSTRING | 0x8110000D | No connection string specified |
Remarks
Populate the returned Recordset object with data describing the new expression. For information on the format and required fields of the Recordset object, see Expression Recordset.
Save the newly defined expression to the expression store using the SaveExpression method. The SaveExpression method automatically generates a new, unique expression ID and stores it with the new expression.
Call the Connect method before calling the NewExpression method.