Article ID: 293400 - Last Review: October 21, 2002 - Revision: 1.0

ConvertExprToSqlFltrStr Method Returns Error for Some XML Expressions

This article was previously published under Q293400
Expand all | Collapse all

SYMPTOMS

When you use the ConvertExprToSqlFltrStr method from the Component Object Model (COM) object, Commerce.ExprFltrQueryBldr, an unexpected error occurs for some Extensible Markup Language (XML) expressions:
Err.Number: -2147467259
Err.Description: Operator used in not of defined type

CAUSE

This error is caused by parsing problems in the Commerce.ExprFltrQueryBldr COM object.

RESOLUTION

To resolve this problem, obtain the latest service pack for Commerce Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
297216  (http://support.microsoft.com/kb/297216/EN-US/ ) INFO: How to Obtain the Latest Commerce Server 2000 Service Pack

STATUS

Microsoft has confirmed that this is a problem in Microsoft Commerce Server 2000. This problem was first corrected in Commerce Server 2000 Service Pack 1.

MORE INFORMATION

ExprFltrQueryBldr.ConvertExprToSqlFltrStr is used to convert an expression from XML to a SQL Server filter query string. For addition information, see the Microsoft Commerce Server 2000 Documentation.

The following parsing issues are corrected by this hotfix:
  • Not all operators for string data type are implemented:

    • Operator "not-equal" does not work for data type "string"
    • Operator "not-begins-with" does not work for data type "string"
    • Operator "not-contains" does not work for data type "string"

    Example:
    <CLAUSE OPER="not-equal">
       <Property ID="UserObject.GeneralInfo.logon_name" TYPE="STRING"/>
       <IMMED-VAL TYPE="string">joe</IMMED-VAL>
    </CLAUSE>
    						
  • Operator "in" does not result in a correct SQL Server filter query string with numeric data types.

    Example:
    <CLAUSE OPER="in">
        <PROPERTY ID="User.Age" TYPE="number" />
        <IMMED-VAL TYPE="number" MULTIVAL="true">
            <VALUE>20</VALUE>
            <VALUE>30</VALUE>
        </IMMED-VAL>
    </CLAUSE>
    						
  • Multivalued expressions fail if the MULITVAL attribute is not lowercase.

    Example:
    <CLAUSE OPER="in">
        <PROPERTY ID="UserObject.GeneralInfo.logon_name" TYPE="string" />
        <IMMED-VAL TYPE="string" MULTIVAL="TRUE">
            <VALUE>joe</VALUE>
            <VALUE>jane</VALUE>
        </IMMED-VAL>
    </CLAUSE>
    						
  • Expressions fail if data type attribute is not lowercase.

    Example:
    <CLAUSE OPER="is-defined">
        <Property ID="UserObject.GeneralInfo.email_address" TYPE="STRING"/>
    </CLAUSE>
    						

APPLIES TO
  • Microsoft Commerce Server 2000 Standard Edition
Keywords: 
kbbug kbpending KB293400
 

Article Translations