IExpressionStore::NewExpression Method [C++]

Commerce Server 2002

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

Definition

[C++]
HRESULT IExpressionStore::NewExpression(
 _Recordset** ppRSExpr
);
[Visual Basic]
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.

[Visual Basic] None.

Return Values

[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.

ConstantValueDescription
E_EXPR_BADCONNECTION

[C++] 0x8110001F

[Visual Basic] &H8110001F

Invalid connection
E_EXPR_NOCONNECTIONSTRING

[C++] 0x8110000D

[Visual Basic] &H8110000D

No connection string specified

Remarks

[C++] 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.

[Visual Basic] 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

[C++] ExpressionStore Object

[C++] IExpressionStore::Connect

[C++] IExpressionStore::SaveExpression

[Visual Basic] ExpressionStore Object

[Visual Basic] ExpressionStore.Connect

[Visual Basic] ExpressionStore.SaveExpression

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Show: