다음을 통해 공유


IExpressionStore::NewExpression Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Use this method to return an ADO hierarchical Recordset object that contains an empty expression.

HRESULT IExpressionStore::NewExpression(
  _Recordset** ppRSExpr
);
Function NewExpression() As Object

Parameters

  • ppRSExpr
    [C++]

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

Return Value

[C++]

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

[Visual Basic]

If this method completes successfully, it returns a hierarchical Recordset object that contains an empty expression.

Error Values

[C++]

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.

[Visual Basic]

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

0x8110001F

&H8110001F

Invalid connection

E_EXPR_NOCONNECTIONSTRING

0x8110000D

&H8110000D

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.

See Also

Other Resources

ExpressionStore Object

IExpressionStore::Connect Method

IExpressionStore::SaveExpression Method