Share via


ExpressionEvaluator.LoadExpr Method (PIA)

Use this method to pre-compile an expression, and if successful, load the expression into the expression cache.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Targeting
…
Public Sub LoadExpr(nExprID As Integer)

[C#]

using Microsoft.CommerceServer.Interop.Targeting;
…
public void LoadExpr(intnExprID);

Parameters

[Visual Basic .NET]

  • nExprID
    A positive Integer that contains the identifier of the expression to load into the expression cache.

[C#]

  • nExprID
    A positive int that contains the identifier of the expression to load into the expression cache.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

[Visual Basic .NET]

The following table shows the custom COM errors that a COMException can wrap.

Value Description
&H81100018 Argument data type information missing from expression, or unrecognized argument data type encountered in expression
&H81100022 Invalid expression argument value, or impossible conversion
&H81100016 Invalid clause encountered
&H8110001F Invalid connection
&H8110000A Invalid expression ID specified
&H81100017 Operator missing, unrecognized operator encountered, or type mismatch
&H81100015 Term type missing, or unrecognized term type encountered
&H81100014 Unrecognized XML element encountered
&H8110000D No connection string specified
&H81100012 Could not find the specified expression ID, nExprID, in the expression store
&H81100013 XML DOM object parsing error

[C#]

The following table shows the custom COM errors that COMException can wrap.

Value Description
0x81100018 Argument data type information missing from expression, or unrecognized argument data type encountered in expression
0x81100022 Invalid expression argument value, or impossible conversion
0x81100016 Invalid clause encountered
0x8110001F Invalid connection
0x8110000A Invalid expression ID specified
0x81100017 Operator missing, unrecognized operator encountered, or type mismatch
0x81100015 Term type missing, or unrecognized term type encountered
0x81100014 Unrecognized XML element encountered
0x8110000D No connection string specified
0x81100012 Could not find the specified expression ID, nExprID, in the expression store
0x81100013 XML DOM object parsing error

Remarks

If the specified expression is already loaded in the expression cache at the time of the call, it will be reloaded.

The LoadExpr method increments the read-only ExprCount property by one (1) when it loads an expression into the expression cache.

With the exception of XML fragments, only expressions that exist in the expression cache may be evaluated. The Eval method loads an expression from the expression store that is not preloaded into the expression cache.

Use the LoadAll method to load all expressions into the expression cache. Use the FlushExpr method to remove an expression from the expression cache.

The Connect method must be called before using the LoadExpr method.

Requirements

Namespace: Microsoft.CommerceServer.Interop.Targeting

Platforms: Windows 2000, Windows Server 2003

Assembly: exprarchlib (in exprarchlib.dll)

See Also

ExpressionEvaluatorClass

ExpressionEvaluator.Connect

ExpressionEvaluator.ExprCount

ExpressionEvaluator.FlushAll

ExpressionEvaluator.FlushExpr

ExpressionEvaluator.LoadAll

Copyright © 2005 Microsoft Corporation.
All rights reserved.