<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>.NET</title><link>http://blogs.clearscreen.com/gui/category/34.aspx</link><description>Todo ese mundo microsoftiano  del desarrollo de aplicaciones de negocio.</description><managingEditor>Guillermo Ruiz Troyano</managingEditor><dc:language>es-ES</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Guillermo Ruiz Troyano</dc:creator><title>Problemas usando el método Compute de DataTable (.NET)</title><link>http://blogs.clearscreen.com/gui/archive/2006/02/03/2750.aspx</link><pubDate>Fri, 03 Feb 2006 17:08:00 GMT</pubDate><guid>http://blogs.clearscreen.com/gui/archive/2006/02/03/2750.aspx</guid><wfw:comment>http://blogs.clearscreen.com/gui/comments/2750.aspx</wfw:comment><comments>http://blogs.clearscreen.com/gui/archive/2006/02/03/2750.aspx#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/gui/comments/commentRss/2750.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/gui/services/trackbacks/2750.aspx</trackback:ping><description>Fastidia perder el tiempo en buscar un fallo en una línea de código tan simple como ésta:

&lt;pre&gt;&lt;span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px"&gt;&lt;span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px"&gt;object&lt;/span&gt; obj &lt;span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px"&gt;=&lt;/span&gt; table.Compute(&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px"&gt;"MIN(Fecha)"&lt;/span&gt;, &lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px"&gt;"Fecha &amp;gt; #"&lt;/span&gt;+DateTime.Now+&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px"&gt;"#"&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;El método devuelve DBNull pero en la tabla hay filas que cumplen la condición del filtro. Al final he tenido que escribir una rutina que realice lo mismo y entonces no ha habido problema.&lt;/p&gt;

&lt;p&gt;Yo supongo que es un fallo de la implementación del método, si es un fallo mío que alguien me lo explique. Si es un fallo de la implementación, ya les vale.&lt;/p&gt;

&lt;p&gt;Algo que también me ha hecho perder el tiempo es el componente Timer. No os recomiendo que lo incorporeis dentro de un componente que no sea el interfaz de usuario.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/gui/aggbug/2750.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml">Fastidia perder el tiempo en buscar un fallo en una línea de código tan simple como ésta:

<pre><span style="color: Black; background-color: Transparent; font-family: Courier New; font-size: 11px"><span style="color: Blue; background-color: Transparent; font-family: Courier New; font-size: 11px">object</span> obj <span style="color: Red; background-color: Transparent; font-family: Courier New; font-size: 11px">=</span> table.Compute(<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px">"MIN(Fecha)"</span>, <span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px">"Fecha &gt; #"</span>+DateTime.Now+<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px">"#"</span>);</span></pre>

<p>El método devuelve DBNull pero en la tabla hay filas que cumplen la condición del filtro. Al final he tenido que escribir una rutina que realice lo mismo y entonces no ha habido problema.</p>

<p>Yo supongo que es un fallo de la implementación del método, si es un fallo mío que alguien me lo explique. Si es un fallo de la implementación, ya les vale.</p>

<p>Algo que también me ha hecho perder el tiempo es el componente Timer. No os recomiendo que lo incorporeis dentro de un componente que no sea el interfaz de usuario.</p><img src ="http://blogs.clearscreen.com/gui/aggbug/2750.aspx" width = "1" height = "1" /></body></item></channel></rss>