Content Selection Framework - how to use EvalXml

This is Interesting: Free IT Magazines  
Home > Archive > Content Selection Framework > July 2004 > how to use EvalXml





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how to use EvalXml
Rajashekar

2004-07-09, 3:13 pm

Hi

I am trying to use ExpressionEvaluatorClass 's EvalXml method, but I always
get System.DBNull as result. Purpose is to evaluate th expression XML
against the OrderForm, this function returns
ExpressionEvaluator.ExpressionResult enumeration which has 3 values true,
false and undefined.

I am not sure whether the parameters I am passing to this function are
correct. Here is what I am using:

Dim objExpressionEvaluator As
Microsoft.CommerceServer.Interop.Targeting.ExpressionEvaluatorClass = New
Microsoft.CommerceServer.Interop.Targeting.ExpressionEvaluatorClass

If Not (IsDBNull(objExpressionEvaluator.EvalXML(strExpressionXML,
TransactionContext.Current.CartOrderForm.Dictionary))) Then

//Code....It never gets inside as the return value from the function is
always null..

End If


Regards


Andy Xu[MSFT]

2004-07-09, 3:15 pm

Hi, there,

you need to call IExpressionEvaluator's Connect method before doing any evaluation. Parse an expression store's connection string to Connect method.

HTH,
Andy Xu [MSFT]
Commerce Server Team
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
--------------------
From: "Rajashekar" <rajasekhark@bsil.com>
Subject: how to use EvalXml
Date: Wed, 7 Jul 2004 10:30:38 +0530
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <OMRUW99YEHA.1264@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
NNTP-Posting-Host: leased-200-22-2.bng.vsnl.net.in 203.200.22.2
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXS01.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.campaigns_csf:2772
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

Hi

I am trying to use ExpressionEvaluatorClass 's EvalXml method, but I always
get System.DBNull as result. Purpose is to evaluate th expression XML
against the OrderForm, this function returns
ExpressionEvaluator.ExpressionResult enumeration which has 3 values true,
false and undefined.

I am not sure whether the parameters I am passing to this function are
correct. Here is what I am using:

Dim objExpressionEvaluator As
Microsoft.CommerceServer.Interop.Targeting.ExpressionEvaluatorClass = New
Microsoft.CommerceServer.Interop.Targeting.ExpressionEvaluatorClass

If Not (IsDBNull(objExpressionEvaluator.EvalXML(strExpressionXML,
TransactionContext.Current.CartOrderForm.Dictionary))) Then

//Code....It never gets inside as the return value from the function is
always null..

End If


Regards




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com