<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : String Comparisons</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : String Comparisons</description>
  <pubDate>Sat, 11 Apr 2026 01:22:27 -700</pubDate>
  <lastBuildDate>Fri, 12 Apr 2013 06:34:19 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4110</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>String Comparisons :  Have you tried looking at the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4110&amp;PID=16215#16215</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 4110<br /><strong>Posted:</strong> 12-Apr-2013 at 6:34am<br /><br />Have you tried looking at the DebugLog or using SQL Profiler to look at the generated SQL? My guess is it's trimming off the space before it queries it. <br><br>Edit:<br><br>I've just tested some queries using LinqPad (http://drc.ideablade.com/devforce-2012/bin/view/Documentation/linqpad-driver)<br>and I'm not able to reproduce it. Have you tried doing a simple query like the below to see if this even works?<br><br>&nbsp;manager.EntityType.Where(e =&gt; e.Field == "Sy ");<br><span style="font-size:10px"><br /><br />Edited by smi-mark - 12-Apr-2013 at 6:39am</span>]]>
   </description>
   <pubDate>Fri, 12 Apr 2013 06:34:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4110&amp;PID=16215#16215</guid>
  </item> 
  <item>
   <title>String Comparisons : HiI am banging my head against...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4110&amp;PID=16214#16214</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 4110<br /><strong>Posted:</strong> 12-Apr-2013 at 12:13am<br /><br />Hi&nbsp;<div><br></div><div>I am banging my head against the wall with a problem.</div><div><br></div><div>It is to do with a string comparison not matching the string in an EntityQuery.</div><div><br></div><div>I am using the following code</div><div><br></div><div><div><font face="Courier New, Courier, mono">&nbsp;PredicateDescription pd = PredicateBuilder.Make(</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; entityType, lookUpField, FilterOperator.IsEqualTo, lookUpValue);</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; query = EntityQuery.Create(entityType, Context).Where(pd);</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pd.IgnoreCase = true;</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retEntity = (Entity) query.FirstOrNullEntity();</font></div></div><div><font face="Courier New, Courier, mono"><br></font></div><div><br></div><div><font face="Arial, Helvetica, sans-serif">My problem is occuring when the lookupValue &nbsp; is &nbsp; 'Sy ' &nbsp; as in Sy with a space following. trying to match the same in the database</font></div><div><font face="Arial, Helvetica, sans-serif"><br></font></div><div><font face="Arial, Helvetica, sans-serif">This code does not find it.&nbsp;</font></div><div><font face="Arial, Helvetica, sans-serif"><br></font></div><div><font face="Arial, Helvetica, sans-serif">However if I change the value and remove the space following it does find it. Even though in the database the data it is looking up does contain a space.</font></div><div><font face="Arial, Helvetica, sans-serif"><br></font></div><div><font face="Arial, Helvetica, sans-serif">I am at a loss as to why this is happening I was hoping someone here would know.</font></div><div><font face="Arial, Helvetica, sans-serif"><br></font></div><div><font face="Arial, Helvetica, sans-serif">thanks</font></div><div><font face="Arial, Helvetica, sans-serif"><br>Murray</font></div>]]>
   </description>
   <pubDate>Fri, 12 Apr 2013 00:13:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4110&amp;PID=16214#16214</guid>
  </item> 
 </channel>
</rss>