<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 77.95pt 72.0pt 77.95pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks a lot Greg<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It works fine.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>With only one detail<o:p></o:p></span></p>

<p class=MsoPlainText style='text-indent:12.0pt'>queryPropertyName =
FdoComputedIdentifier::Create(L&quot;AMOUNT&quot;, L&quot;AREA *
LAND_VALUE&quot;);&nbsp;<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>does not work directly<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I used<o:p></o:p></span></p>

<p class=MsoPlainText style='text-indent:12.0pt'>queryPropertyName =
FdoComputedIdentifier::Create(L&quot;AMOUNT&quot;, FdoExpression::Parse(L&quot;AREA
* LAND_VALUE&quot;));&nbsp;<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Greg Boone<br>
<b>Sent:</b> mardi 6 février 2007 19:32<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> RE: [mapguide-users] How to select expression with the
FDOproviderforSDF<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>Actually, after consulting with other team members, you can achieve
the expected results using the FdoISelect command. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'>You need to use a computed identifier; try replace the &quot;</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'>FdoIdentifier::Create(&quot;AREA
* LAND_VALUE&quot;);<span style='color:navy'>&quot; with </span>FdoComputedIdentifier::Create(L&quot;AMOUNT&quot;,L&quot;AREA
* LAND_VALUE&quot;);<span style='color:navy'><o:p></o:p></span></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText>&nbsp;
FdoPtr&lt;FdoISelect&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sampleSelect;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIFeatureReader&gt;
sampleFeatureReader;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIdentifier&gt;
&nbsp;&nbsp;&nbsp;&nbsp;queryPropertyName;<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp; sampleSelect =
(FdoISelect*)m_connection-&gt;CreateCommand(FdoCommandType_Select);<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;
sampleSelect-&gt;SetFeatureClassName(&quot;Parcels&quot;);<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIdentifierCollection&gt;
propertyCollection = sampleSelect-&gt;GetPropertyNames();<o:p></o:p></p>

<p class=MsoPlainText style='text-indent:12.0pt'>queryPropertyName =
FdoComputedIdentifier::Create(L&quot;AMOUNT&quot;, L&quot;AREA *
LAND_VALUE&quot;);&nbsp;<o:p></o:p></p>

<p class=MsoPlainText style='text-indent:12.0pt'>propertyCollection-&gt;Add(queryPropertyName);<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; sampleFeatureReader = sampleSelect-&gt;Execute();<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; while (sampleFeatureReader-&gt;ReadNext() )<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; {<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;printf(&quot;(AREA *
LAND_VALUE) = %ls\n&quot;,
sampleFeatureReader-&gt;GetString(L&quot;AMOUNT&quot;) );<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; }<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:navy'><o:p>&nbsp;</o:p></span></p>

<div>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Greg Boone<br>
<b>Sent:</b> Tuesday, February 06, 2007 10:09 AM<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> RE: [mapguide-users] How to select expression with the FDO
providerforSDF</span><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I believe you need to use the FDO SelectAggregates
command as generally outlined below&#8230;.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>FdoPtr&lt;FdoIDataReader&gt; myDataReader;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>FdoPtr&lt;FdoISelectAggregates&gt; selCmdAggreg;<o:p></o:p></span></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>selCmdAggreg =
(FdoISelectAggregates*)mConnection-&gt;CreateCommand(
FdoCommandType_SelectAggregates );<o:p></o:p></p>

<p class=MsoPlainText>selCmdAggreg-&gt;SetFeatureClassName(L&quot;ClassA&quot;);<o:p></o:p></p>

<p class=MsoPlainText>FdoPtr&lt;FdoComputedIdentifier&gt; cmpId =
(FdoComputedIdentifier*)FdoExpression::Parse(L&quot;(PropertyA*PropertyB) AS
FunctionA&quot;);<o:p></o:p></p>

<p class=MsoPlainText>FdoPtr&lt;FdoIdentifierCollection&gt; idCol =
selCmdAggreg-&gt;GetPropertyNames();<o:p></o:p></p>

<p class=MsoPlainText>idCol-&gt;Add( cmpId );<o:p></o:p></p>

<p class=MsoPlainText>myDataReader = selCmdAggreg-&gt;Execute();<o:p></o:p></p>

<p class=MsoPlainText>while ( myDataReader-&gt;ReadNext() )<o:p></o:p></p>

<p class=MsoPlainText>{<o:p></o:p></p>

<p class=MsoPlainText>&nbsp;&nbsp;&nbsp; printf(&quot;(PropertyA*PropertyB) =
%ls\n&quot;, myDataReader-&gt;GetString(L&quot;FunctionA&quot;) );<o:p></o:p></p>

<p class=MsoPlainText>}<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>-----Original Message-----<br>
From: mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] On Behalf Of Bruno Scott<br>
Sent: Tuesday, February 06, 2007 5:50 AM<br>
To: mapguide-users@lists.osgeo.org<br>
Subject: [mapguide-users] How to select expression with the FDO provider forSDF<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I'm trying to select expression using the FDO provider
for SDF but it always<o:p></o:p></p>

<p class=MsoPlainText>return me errors<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>This is my sample code<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp;
FdoPtr&lt;FdoISelect&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sampleSelect;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIFeatureReader&gt;
sampleFeatureReader;<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIdentifier&gt; queryPropertyName;<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp; sampleSelect = (FdoISelect<o:p></o:p></p>

<p class=MsoPlainText>*)m_connection-&gt;CreateCommand(FdoCommandType_Select);<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; sampleSelect-&gt;SetFeatureClassName(&quot;Parcels&quot;);<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&nbsp; FdoPtr&lt;FdoIdentifierCollection&gt;
propertyCollection = <o:p></o:p></p>

<p class=MsoPlainText>sampleSelect-&gt;GetPropertyNames();<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; queryPropertyName =
FdoIdentifier::Create(&quot;AREA * LAND_VALUE&quot;);<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; propertyCollection-&gt;Add(queryPropertyName);<o:p></o:p></p>

<p class=MsoPlainText>&nbsp; sampleFeatureReader = sampleSelect-&gt;Execute();<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>What am i doing wrong?<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Thanks<o:p></o:p></p>

<p class=MsoPlainText>Bruno Scott<o:p></o:p></p>

<p class=MsoPlainText>-- <o:p></o:p></p>

<p class=MsoPlainText>View this message in context:
http://www.nabble.com/How-to-select-expression-with-the-FDO-provider-for-SDF-tf3179976s16610.html#a8823998<o:p></o:p></p>

<p class=MsoPlainText>Sent from the MapGuide Users mailing list archive at
Nabble.com.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>_______________________________________________<o:p></o:p></p>

<p class=MsoPlainText>mapguide-users mailing list<o:p></o:p></p>

<p class=MsoPlainText>mapguide-users@lists.osgeo.org<o:p></o:p></p>

<p class=MsoPlainText>http://lists.osgeo.org/mailman/listinfo/mapguide-users<o:p></o:p></p>

</div>

</body>

</html>