Export (0) Print
Expand All
ExpressionStore.Connect Method
ExpressionStore.DeleteExpression Method
ExpressionStore.Disconnect Method
ExpressionStore.Export Method
ExpressionStore.GetAllExprs Method
ExpressionStore.GetExpression Method
ExpressionStore.GetExprID Method
ExpressionStore.GetExprName Method
ExpressionStore.Import Method
ExpressionStore.NewExpression Method
ExpressionStore.Query Method
ExpressionStore.RenameExpression Method
ExpressionStore.SaveExpression Method
Expand Minimize

IExpressionStore::GetExprName Method [C++]

Commerce Server 2002

Use this method to translate the ID of an expression into its corresponding expression name.

Definition

[C++]
HRESULT IExpressionStore::GetExprName(
 long nExprID,
 BSTR* pstrExprName
);
[Visual Basic]
Function GetExprName(
 nExprID As Long
) As String

Parameters

nExprID [C++]
[in] A long that contains a unique expression ID.
nExprID [Visual Basic]
[in] A Long that contains a unique expression ID.
pstrExprName [C++]
[out, retval] A pointer to a BSTR that contains the name of the expression. On failure, the expression name is set to NULL.

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 String that contains the name of the expression. An empty String is returned if the expression ID is a Long but does not represent an existing expression in the expression store.

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_BADEXPRID

[C++] 0x8110000A

[Visual Basic] &H8110000A

Invalid expression ID specified
E_EXPR_NOCONNECTIONSTRING

[C++] 0x8110000D

[Visual Basic] &H8110000D

No connection string specified

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

[Visual Basic] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

Use the GetExprID method to translate the name of an expression into its corresponding expression ID.

Call the Connect method before calling the GerExprName method.

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

[C++]

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

See Also

[C++] ExpressionStore Object

[C++] IExpressionStore::Connect

[C++] IExpressionStore::GetExprID

[Visual Basic] ExpressionStore Object

[Visual Basic] ExpressionStore.Connect

[Visual Basic] ExpressionStore.GetExprID

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft