<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for I Learnt Today...</title>
	<atom:link href="http://www.ilearnttoday.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ilearnttoday.com</link>
	<description>This is where I share what I learn day by day...</description>
	<lastBuildDate>Fri, 18 May 2012 13:39:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Great Quotes by Menol</title>
		<link>http://www.ilearnttoday.com/great-quotes#comment-4293</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Fri, 18 May 2012 13:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?page_id=464#comment-4293</guid>
		<description>Thanks for your kind comments!</description>
		<content:encoded><![CDATA[<p>Thanks for your kind comments!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How To Check For NULL Values Correctly In SQL by Tom</title>
		<link>http://www.ilearnttoday.com/nullcheckinsql#comment-4291</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 17 May 2012 23:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?p=665#comment-4291</guid>
		<description>Hello! Great blog, I love it!</description>
		<content:encoded><![CDATA[<p>Hello! Great blog, I love it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Great Quotes by Elisabete</title>
		<link>http://www.ilearnttoday.com/great-quotes#comment-4290</link>
		<dc:creator>Elisabete</dc:creator>
		<pubDate>Thu, 17 May 2012 11:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?page_id=464#comment-4290</guid>
		<description>i would be subscribing to your feed myself in case you got more interesting posts!</description>
		<content:encoded><![CDATA[<p>i would be subscribing to your feed myself in case you got more interesting posts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Great Quotes by escort bayan</title>
		<link>http://www.ilearnttoday.com/great-quotes#comment-4289</link>
		<dc:creator>escort bayan</dc:creator>
		<pubDate>Wed, 16 May 2012 09:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?page_id=464#comment-4289</guid>
		<description>thank you for all your efforts that you have put in this. Very interesting info. “Aim at heaven and you will get earth thrown in. Aim at earth and you get neither.” by Clive Staples Lewis.</description>
		<content:encoded><![CDATA[<p>thank you for all your efforts that you have put in this. Very interesting info. “Aim at heaven and you will get earth thrown in. Aim at earth and you get neither.” by Clive Staples Lewis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Great Quotes by John Chow</title>
		<link>http://www.ilearnttoday.com/great-quotes#comment-4284</link>
		<dc:creator>John Chow</dc:creator>
		<pubDate>Fri, 11 May 2012 04:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?page_id=464#comment-4284</guid>
		<description>great read. I can tell you put a lot of thought into it. Keep up the good work!</description>
		<content:encoded><![CDATA[<p>great read. I can tell you put a lot of thought into it. Keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Oracle Trunc Function by Menol</title>
		<link>http://www.ilearnttoday.com/oracle-trunc-function#comment-4269</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Mon, 23 Apr 2012 11:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=24#comment-4269</guid>
		<description>Hi Abhinav,

The results you get may be the same but the process isn&#039;t.

When you don&#039;t specify the formatting string, then the formatter will use current culture settings it can find in the database server. These settings can easily be changed by an admin for different purposes.

If current culture settings in the server are same to what you want then you are fine as long as those culture settings remain same. When someone changes those settings then the result you get will not be the same.

On the other hand, when you specify the format you can rest assured that the output will be exactly what you want regardless of any cultural changes to the server.

Thanks.
Menol</description>
		<content:encoded><![CDATA[<p>Hi Abhinav,</p>
<p>The results you get may be the same but the process isn&#8217;t.</p>
<p>When you don&#8217;t specify the formatting string, then the formatter will use current culture settings it can find in the database server. These settings can easily be changed by an admin for different purposes.</p>
<p>If current culture settings in the server are same to what you want then you are fine as long as those culture settings remain same. When someone changes those settings then the result you get will not be the same.</p>
<p>On the other hand, when you specify the format you can rest assured that the output will be exactly what you want regardless of any cultural changes to the server.</p>
<p>Thanks.</p>
<p>Menol</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT by Menol</title>
		<link>http://www.ilearnttoday.com/dataview-row-filter-for-date-time#comment-4268</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Mon, 23 Apr 2012 11:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?p=577#comment-4268</guid>
		<description>Hi Moeed,

I don&#039;t see anything wrong in setting the RowFilter value. 

Can you debug/trace the click event that causes to throw the exception and see if the value you set has not changed by the time you click on the grid?

Menol</description>
		<content:encoded><![CDATA[<p>Hi Moeed,</p>
<p>I don&#8217;t see anything wrong in setting the RowFilter value. </p>
<p>Can you debug/trace the click event that causes to throw the exception and see if the value you set has not changed by the time you click on the grid?</p>
<p>Menol</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT by Moeed</title>
		<link>http://www.ilearnttoday.com/dataview-row-filter-for-date-time#comment-4267</link>
		<dc:creator>Moeed</dc:creator>
		<pubDate>Mon, 23 Apr 2012 11:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?p=577#comment-4267</guid>
		<description>Hi Menol, 

i am using VS 2008 , using C# / SQL with desktop application. my code is here under. can you help with this.


 string colName = &quot;&quot;;
                switch(cboFilter.Text)
                {
                    case &quot;Our Ref&quot;:
                    colName = &quot;OurCaseRef&quot;;
                    break;
....
.
.
.
.
Note : Many cases are there
		}


if (colName == &quot;CDOB&quot;)
                {
       

                   dtCases.DefaultView.RowFilter = string.Concat(&quot;CONVERT(CDOB, System.String) LIKE &#039;%&quot;, txtFilter.Text.Trim(), &quot;%&#039;&quot;);</description>
		<content:encoded><![CDATA[<p>Hi Menol, </p>
<p>i am using VS 2008 , using C# / SQL with desktop application. my code is here under. can you help with this.</p>
<p> string colName = &#8220;&#8221;;<br />
                switch(cboFilter.Text)<br />
                {<br />
                    case &#8220;Our Ref&#8221;:<br />
                    colName = &#8220;OurCaseRef&#8221;;<br />
                    break;<br />
&#8230;.<br />
.<br />
.<br />
.<br />
.<br />
Note : Many cases are there<br />
		}</p>
<p>if (colName == &#8220;CDOB&#8221;)<br />
                {</p>
<p>                   dtCases.DefaultView.RowFilter = string.Concat(&#8220;CONVERT(CDOB, System.String) LIKE &#8216;%&#8221;, txtFilter.Text.Trim(), &#8220;%&#8217;&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT by Menol</title>
		<link>http://www.ilearnttoday.com/dataview-row-filter-for-date-time#comment-4266</link>
		<dc:creator>Menol</dc:creator>
		<pubDate>Mon, 23 Apr 2012 07:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?p=577#comment-4266</guid>
		<description>Hi,

Non string data columns are converted Only in the filtering process. This filtering doesn&#039;t affect the actual data column so your datetime data column will remain date time. Therefore this doesn&#039;t affect (tested in my application) your sorting or any other grid operation.

This solution was introduced to handle “Cannot perform ‘Like’ operation on System.DateTime and System.String.”. problem so are you sure you did following:

1) added a different row filter for each column that you want to search in?
2) added a convert function for each non-string column?

if it helps, following is the actual code I used in my application which runs perfectly at the moment.

[sourcecode language=&quot;csharp&quot;]
            StringBuilder _sb = new StringBuilder();

            foreach (GridColumn _col in DxGrid.Columns)
            {
                if (_col.Visible &amp;&amp; _col.Width != 5.0)
                {
                    if (_sb.Length &gt; 0)
                    {
                        _sb.Append(&quot; OR &quot;);
                    }

                    // filter out non string columns and convert them to string before applying the filter cos&#039; those columns don&#039;t support LIKE statements
                    if (((DataView)DxGrid.DataSource).Table.Columns[_col.FieldName].DataType != typeof(String))
                    {
                        _sb.Append(string.Concat(&quot;CONVERT(&quot;, _col.FieldName, &quot;, System.String)&quot;));
                        _sb.Append(string.Concat(&quot; LIKE &#039;%&quot;, SearchFor, &quot;%&#039;&quot;));
                    }
                    else
                    {
                        _sb.Append(string.Concat(_col.FieldName, &quot; LIKE &#039;%&quot;, SearchFor, &quot;%&#039;&quot;));
                    }
                }
            }
           
            
            ((DataView)DxGrid.DataSource).RowFilter = _sb.ToString();
[/sourcecode]</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Non string data columns are converted Only in the filtering process. This filtering doesn&#8217;t affect the actual data column so your datetime data column will remain date time. Therefore this doesn&#8217;t affect (tested in my application) your sorting or any other grid operation.</p>
<p>This solution was introduced to handle “Cannot perform ‘Like’ operation on System.DateTime and System.String.”. problem so are you sure you did following:</p>
<p>1) added a different row filter for each column that you want to search in?<br />
2) added a convert function for each non-string column?</p>
<p>if it helps, following is the actual code I used in my application which runs perfectly at the moment.</p>
<pre class="brush: csharp; title: ; notranslate">
            StringBuilder _sb = new StringBuilder();

            foreach (GridColumn _col in DxGrid.Columns)
            {
                if (_col.Visible &amp;&amp; _col.Width != 5.0)
                {
                    if (_sb.Length &gt; 0)
                    {
                        _sb.Append(&quot; OR &quot;);
                    }

                    // filter out non string columns and convert them to string before applying the filter cos' those columns don't support LIKE statements
                    if (((DataView)DxGrid.DataSource).Table.Columns[_col.FieldName].DataType != typeof(String))
                    {
                        _sb.Append(string.Concat(&quot;CONVERT(&quot;, _col.FieldName, &quot;, System.String)&quot;));
                        _sb.Append(string.Concat(&quot; LIKE '%&quot;, SearchFor, &quot;%'&quot;));
                    }
                    else
                    {
                        _sb.Append(string.Concat(_col.FieldName, &quot; LIKE '%&quot;, SearchFor, &quot;%'&quot;));
                    }
                }
            }

            ((DataView)DxGrid.DataSource).RowFilter = _sb.ToString();
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT by Moeed</title>
		<link>http://www.ilearnttoday.com/dataview-row-filter-for-date-time#comment-4265</link>
		<dc:creator>Moeed</dc:creator>
		<pubDate>Sat, 21 Apr 2012 13:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ilearnttoday.com/?p=577#comment-4265</guid>
		<description>Hi, 
It works, but sort function will not work with this technique. 

when ever you click on any column. it will through an error &quot;Cannot perform &#039;Like&#039; operation on System.DateTime and System.String.&quot;. 

Any solution ?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
It works, but sort function will not work with this technique. </p>
<p>when ever you click on any column. it will through an error &#8220;Cannot perform &#8216;Like&#8217; operation on System.DateTime and System.String.&#8221;. </p>
<p>Any solution ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

