<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2645906135710799567</id><updated>2024-10-24T11:39:06.456-05:00</updated><category term="C#"/><category term="truco"/><category term="asp.net"/><category term="archivos"/><category term="Utilidad"/><category term="sql"/><category term="SQL SERVER"/><category term="php"/><category term="Calculo"/><category term="Método"/><category term="cadena"/><category term="consulta"/><category term="consultar tablas"/><category term="crear"/><category term="2010"/><category term="COnfiguración"/><category term="Carga"/><category term="Cast"/><category term="Code Behind"/><category term="Colombia"/><category term="Contadores"/><category term="Controles de usuario"/><category term="ETL"/><category term="Fechas"/><category term="Festivo"/><category term="Integration Services"/><category term="MySql"/><category term="Procedimiento Almacenado"/><category term="Pruebas"/><category term="Rendimiento"/><category term="Reporting Services 2008"/><category term="StringBuilder"/><category term="StripLine"/><category term="Visual Studio"/><category term="acentos"/><category term="agrega"/><category term="algoritmo"/><category term="archivo"/><category term="automáticamente"/><category term="browser"/><category term="cambiar"/><category term="clase"/><category term="conexión"/><category term="control de usuario"/><category term="copiar"/><category term="correo"/><category term="dinámicamente"/><category term="directorios"/><category term="ejemplo"/><category term="email"/><category term="enviar"/><category term="esquema"/><category term="fecha actual"/><category term="festivos"/><category term="full outer join"/><category term="funcion"/><category term="gmail"/><category term="ima"/><category term="imagen"/><category term="inner join"/><category term="joins"/><category term="leer"/><category term="left join"/><category term="linea"/><category term="metodo"/><category term="navegador"/><category term="ordenamiento"/><category term="principios sql"/><category term="registros"/><category term="reinicio"/><category term="repetidos"/><category term="right join"/><category term="switch"/><category term="texto"/><category term="tildes"/><category term="transformar"/><category term="tutorial"/><category term="unicode"/><category term="vector"/><title type='text'>ByteRide</title><subtitle type='html'>ByteRide busca generar un punto de encuentro para desarrolladores y entusiastas de la computación, donde se hallen soluciones sencillas a problemas sencillos. Queremos lograr un compilado de trucos, herramientas, tutoriales y respuestas a problemas de programación; Iniciaremos con javascript, html, php, c#, asp.net, sql, pero siempre buscando ampliar nuestros conocimientos.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-1430947872323925349</id><published>2017-02-21T08:42:00.002-05:00</published><updated>2017-02-21T08:44:05.452-05:00</updated><title type='text'>Cómo crear tablas dinámicas en excel, fácil y práctico</title><content type='html'>Cómo crear tablas dinámicas en Excel, fácil y práctico&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/3_68NuG69i0/0.jpg&quot; src=&quot;https://www.youtube.com/embed/3_68NuG69i0?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/1430947872323925349/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2017/02/como-crear-tablas-dinamicas-en-excel.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1430947872323925349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1430947872323925349'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2017/02/como-crear-tablas-dinamicas-en-excel.html' title='Cómo crear tablas dinámicas en excel, fácil y práctico'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/3_68NuG69i0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-6835360871802084118</id><published>2015-12-28T14:49:00.002-05:00</published><updated>2015-12-29T08:00:37.954-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algoritmo"/><category scheme="http://www.blogger.com/atom/ns#" term="Calculo"/><category scheme="http://www.blogger.com/atom/ns#" term="Colombia"/><category scheme="http://www.blogger.com/atom/ns#" term="ejemplo"/><category scheme="http://www.blogger.com/atom/ns#" term="Festivo"/><category scheme="http://www.blogger.com/atom/ns#" term="festivos"/><category scheme="http://www.blogger.com/atom/ns#" term="funcion"/><category scheme="http://www.blogger.com/atom/ns#" term="metodo"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER"/><title type='text'>Calculo de días festivos para Colombia</title><content type='html'>El siguiente post tiene como fin, publicar las funciones necesarias para calcular los días festivos en Colombia. Esta desarrollado en T-SQL compatible con Sql Server 2008 o superior.&lt;br /&gt;
&lt;br /&gt;
Está compuesto por 5 funciones de las cuales tres son para acciones auxiliares y las dos restantes permiten listar los festivos de un año determinado o verificar si una fecha es festivo.&lt;br /&gt;
&lt;br /&gt;
Espero sea de utilidad.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Función que nos permite crear una fecha a partir del día, mes y año. Para evitar problemas con la configuración regional.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;DROP FUNCTION F_CREAR_FECHA
GO
CREATE FUNCTION F_CREAR_FECHA(@ANIO INT, @MES INT, @DIA INT)
RETURNS DATE
AS
BEGIN
 RETURN DATEADD(mm, (@ANIO - 1900) * 12 + @MES - 1 , @DIA - 1)
END
&lt;/pre&gt;
&lt;b&gt;2. Función que a partir de una fecha obtiene el siguiente lunes.

&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;DROP FUNCTION F_OBTENER_SIGUIENTE_LUNES
GO
CREATE FUNCTION F_OBTENER_SIGUIENTE_LUNES(@FECHA DATE)
RETURNS DATE
AS
BEGIN
 DECLARE @LUNES INT = 1
 IF @@DATEFIRST = 7 
 BEGIN 
  SET @LUNES = 2
 END
 IF @@DATEFIRST = 1 
 BEGIN 
  SET @LUNES = 1
 END
 IF @@DATEFIRST = 2 
 BEGIN 
  SET @LUNES = 7
 END
 IF @@DATEFIRST = 3 
 BEGIN 
  SET @LUNES = 6
 END 
 IF @@DATEFIRST = 4 
 BEGIN 
  SET @LUNES = 5
 END   
 IF @@DATEFIRST = 5 
 BEGIN 
  SET @LUNES = 4
 END    
 IF @@DATEFIRST = 6
 BEGIN 
  SET @LUNES = 3
 END     
 DECLARE @FECHA_DEVOLVER  DATE
 IF DATEPART(DW, @FECHA) = @LUNES
 BEGIN
  SET @FECHA_DEVOLVER = @FECHA
 END
 ELSE
 BEGIN
  SET @FECHA_DEVOLVER = DATEADD([day], ((DATEDIFF([day], &#39;19000101&#39;, @FECHA) / 7) * 7) + 7, &#39;19000101&#39;);          
 END 
 RETURN @FECHA_DEVOLVER
END
&lt;/pre&gt;
&lt;b&gt;3. Función que calcula el domingo de pascua para un año en particular.

&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;DROP FUNCTION F_CALCULA_DOMINGO_PASCUA
GO
CREATE FUNCTION F_CALCULA_DOMINGO_PASCUA(@A_ANO INT)
RETURNS DATE
AS
BEGIN
 DECLARE @M  INT = 25
 DECLARE @N  INT = 5
 DECLARE @A  INT
 DECLARE @B  INT 
 DECLARE @C  INT 
 DECLARE @D  INT 
 DECLARE @E  INT 
 DECLARE @DIA INT
 DECLARE @MES INT
 
 IF  (@A_ANO &amp;gt;= 1583 AND @A_ANO &amp;lt;= 1699)  
 BEGIN
   SET @M = 22
   SET @N = 2
 END 
 ELSE IF (@A_ANO &amp;gt;= 1700 AND @A_ANO &amp;lt;= 1799)  
 BEGIN 
  SET @M = 23
  SET @N = 3 
 END
 ELSE IF (@A_ANO &amp;gt;= 1800 AND @A_ANO &amp;lt;= 1899)  
 BEGIN
  SET @M = 23
  SET @N = 4 
 END
 ELSE IF (@A_ANO &amp;gt;= 1900 AND @A_ANO &amp;lt;= 2099)  
 BEGIN
  SET @M = 24
  SET @N = 5 
 END
 ELSE IF (@A_ANO &amp;gt;= 2100 AND @A_ANO &amp;lt;= 2199)  
 BEGIN 
  SET @M = 24
  SET @N = 6; 
 END 
 ELSE IF (@A_ANO &amp;gt;= 2200 AND @A_ANO &amp;lt;= 2299)  
 BEGIN
  SET @M = 25
  SET @N = 0
 END  
 
 SET @A = @A_ANO % 19
 SET @B = @A_ANO % 4
 SET @C = @A_ANO % 7
 SET @D = (19 * @A + @M) % 30;
 SET @E = (2 * @B + 4 * @C + 6 * @D + @N) % 7; 

 
 IF (@D + @E &amp;lt; 10) 
 BEGIN
  SET @DIA = @D + @E + 22
  SET @MES = 3
 END
 ELSE 
 BEGIN 
  SET @DIA = @D + @E - 9
  SET @MES = 4
 END
 
 
 IF (@DIA = 26 AND @MES = 4)
 BEGIN 
  SET @DIA = 19
 END
 IF (@DIA = 25 AND @MES = 4 AND @D = 28 AND @E = 6 AND @A &amp;gt; 10)
 BEGIN
  SET @DIA = 18
 END
  
 RETURN dbo.F_CREAR_FECHA(@A_ANO, @MES, @DIA);
END

&lt;/pre&gt;
&lt;b&gt;
4. Función Recibe un año y retorna el listado de los festivos para ese año.
&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;
DROP FUNCTION F_LISTA_FESTIVOS
GO
CREATE FUNCTION F_LISTA_FESTIVOS(@ANIO INT)
 RETURNS @ListaFestivos TABLE(FechaFestivo DATE, Descripcion VARCHAR(50))
AS
BEGIN
 DECLARE @PASCUA DATE = dbo.F_CALCULA_DOMINGO_PASCUA(@ANIO)
 DECLARE @ES_FESTIVO BIT = 0
 
 
 -- Festivos Fecha Fija 
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 1, 1), &#39;Año Nuevo&#39;)
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 5, 1), &#39;Día del Trabajo&#39;)
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 7, 20), &#39;Grito de la Independencia&#39;)
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 8, 7), &#39;Batalla de Boyacá&#39;)   
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 12, 8), &#39;Inmaculada Concepción&#39;)      
   INSERT INTO @ListaFestivos VALUES(dbo.F_CREAR_FECHA(@ANIO, 12, 25), &#39;Navidad&#39;) 
 -- Festivos Siguiente Lunes
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 1, 6)), &#39;Epifanía (Reyes Magos)&#39;)
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 3, 19)), &#39;San José esposo de la virgen María&#39;)   
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 6, 29)), &#39;San Pedro y San Pablo&#39;)      
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 8, 15)), &#39;Asunción de la Virgen&#39;)         
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 10, 12)), &#39;Día de la Raza&#39;)            
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 11, 1)), &#39;Todos los Santos&#39;)               
   INSERT INTO @ListaFestivos VALUES(dbo.F_OBTENER_SIGUIENTE_LUNES(dbo.F_CREAR_FECHA(@ANIO, 11, 11)), &#39;Independencia de Cartagena&#39;)                  
 -- Festivos Dependientes de la pascua
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,-7,@PASCUA), &#39;Domingo De Ramos&#39;)                  
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,-3,@PASCUA), &#39;Jueves Santo&#39;)                     
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,-2,@PASCUA), &#39;Viernes Santo&#39;)                        
   INSERT INTO @ListaFestivos VALUES(@PASCUA, &#39;Domingo De Pascua&#39;)                           
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,43,@PASCUA), &#39;Ascensión de Jesús&#39;) 
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,64,@PASCUA), &#39;Corpus Christi&#39;)    
   INSERT INTO @ListaFestivos VALUES(DATEADD(DAY,71,@PASCUA), &#39;Sagrado Corazón de Jesús&#39;)       

 RETURN;
END
&lt;/pre&gt;
&lt;b&gt;5.Función Recibe una fecha y retorna un Booleano indicando si es festivo o no
&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;
DROP FUNCTION F_CALCULA_ES_FESTIVO
GO
CREATE FUNCTION F_CALCULA_ES_FESTIVO(@FECHA DATE)
RETURNS BIT
AS
BEGIN
 DECLARE @ES_FESTIVO BIT = 0
 IF EXISTS (SELECT * FROM dbo.F_LISTA_FESTIVOS(YEAR(@FECHA)) WHERE FechaFestivo = @FECHA) 
 BEGIN
  SET @ES_FESTIVO = 1
 END
 RETURN (@ES_FESTIVO);
END
&lt;/pre&gt;
&lt;b&gt;Por último la manera de verificar las funciones:
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;SELECT dbo.F_CALCULA_ES_FESTIVO(CONVERT(DATE, &#39;01/01/2016&#39;)) EsFestivo
SELECT * FROM dbo.F_LISTA_FESTIVOS(2016) ORDER BY FechaFestivo&lt;/pre&gt;
&lt;br /&gt;
Y el resultado de las consultas seria el siguiente:


&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKER-Pr4qYye8SV1ZJJ2FqS1DIzpBw8q9-PsPqBFYRKAOuFkHcP3kgj_90lsv0BIDpCMokXOZM2OQcLz5VyOJ7WXSAvvfWNq4MzGSyq3P_rckuxTQQeVrNuUxxhYfYJ1qYvAoSRDoNcO8/s1600/temp.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKER-Pr4qYye8SV1ZJJ2FqS1DIzpBw8q9-PsPqBFYRKAOuFkHcP3kgj_90lsv0BIDpCMokXOZM2OQcLz5VyOJ7WXSAvvfWNq4MzGSyq3P_rckuxTQQeVrNuUxxhYfYJ1qYvAoSRDoNcO8/s320/temp.png&quot; width=&quot;216&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/6835360871802084118/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2015/12/calculo-de-dias-festivos-para-colombia.html#comment-form' title='4 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6835360871802084118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6835360871802084118'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2015/12/calculo-de-dias-festivos-para-colombia.html' title='Calculo de días festivos para Colombia'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKER-Pr4qYye8SV1ZJJ2FqS1DIzpBw8q9-PsPqBFYRKAOuFkHcP3kgj_90lsv0BIDpCMokXOZM2OQcLz5VyOJ7WXSAvvfWNq4MzGSyq3P_rckuxTQQeVrNuUxxhYfYJ1qYvAoSRDoNcO8/s72-c/temp.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-5001836084163582270</id><published>2015-08-28T08:16:00.004-05:00</published><updated>2015-08-28T08:24:53.630-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Carga"/><category scheme="http://www.blogger.com/atom/ns#" term="COnfiguración"/><category scheme="http://www.blogger.com/atom/ns#" term="Contadores"/><category scheme="http://www.blogger.com/atom/ns#" term="Pruebas"/><category scheme="http://www.blogger.com/atom/ns#" term="Rendimiento"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Activar contadores de rendimiento en pruebas de carga</title><content type='html'>Al realizar pruebas de carga con Visual Studio en ciertas ocasiones ocurre que no es posible tomar los contadores de rendimiento de las servidores (base de datos, aplicaciones, entre otros) donde esta la aplicación.&lt;br /&gt;
&lt;br /&gt;
los siguientes pasos son los necesarios para permitir la toma de dichos contadores, esta es la traducción y adecuación de un post ya publicado previamente en ingles, si quieres ir al post original este es el &lt;a href=&quot;http://blogs.msdn.com/b/rubel/archive/2011/06/04/issues-while-collecting-counters-during-load-test-execution.aspx&quot;&gt;link&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
En el servidor al cual se le van a tomar los contadores de
desempeño realizar los siguientes pasos:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 7pt; font-stretch: normal; text-indent: -18pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;En el firewall, en el apartado de reglas de
entrada, verificar que estén permitidas las reglas correspondientes a &lt;/span&gt;&lt;b style=&quot;text-indent: -18pt;&quot;&gt;“Performance Logs and Alerts”.&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgycWwwO6pPMOwhG6xVkHL2h9ElZmfx7miziLlNTuu7fwTLT0BG5Y6vCou6kcl1sth6dxB7vEVygTwKnzKnrWii9mAzfUuz77syKhHdu7S_w7xD4W8QVOSaOPDIb7wWhftBNO0aGiPxhzI/s1600/Firewall.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgycWwwO6pPMOwhG6xVkHL2h9ElZmfx7miziLlNTuu7fwTLT0BG5Y6vCou6kcl1sth6dxB7vEVygTwKnzKnrWii9mAzfUuz77syKhHdu7S_w7xD4W8QVOSaOPDIb7wWhftBNO0aGiPxhzI/s320/Firewall.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;text-indent: -18pt;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;font-size: 7pt; font-stretch: normal; text-indent: -18pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;Agregar a los usuarios de dominio con los cuales se va a realizar la prueba,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;a los grupos de
usuario: &lt;/span&gt;&lt;b style=&quot;text-indent: -18pt;&quot;&gt;Performance Log Users&lt;/b&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt; y &lt;/span&gt;&lt;b style=&quot;text-indent: -18pt;&quot;&gt;Performance Monitor Users&lt;/b&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-indent: -18pt;&quot;&gt;Verificar que los servicios de &lt;b&gt;Windows Performance
Logs&lt;/b&gt; &amp;amp; &lt;b&gt;Alerts y Remote Register&lt;/b&gt; estén activos e iniciados.&lt;/span&gt;&lt;!--[if !supportLists]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;font-size: 7pt; font-stretch: normal;&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPi7Y4qsRIODPHhfRyqwFGTmMhMrGAQ3N6lvQEvwCobZ0Iar4fS1NtINBRkPosZ6OOKW7QtZw-0FseVY4UMNj27AvxEz943vWRRfYUujv7ARVa2q84n49zRx3y4IdhC55KfvYOASq9wwk/s1600/Servicios.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPi7Y4qsRIODPHhfRyqwFGTmMhMrGAQ3N6lvQEvwCobZ0Iar4fS1NtINBRkPosZ6OOKW7QtZw-0FseVY4UMNj27AvxEz943vWRRfYUujv7ARVa2q84n49zRx3y4IdhC55KfvYOASq9wwk/s320/Servicios.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;Otro inconveniente que se presenta esta asociado al tiempo que espera &lt;b&gt;Visual Studio&lt;/b&gt; para recibir la notificación de los contadores, el cual en ciertas ocaciones no es&amp;nbsp;suficiente, lo cual se &amp;nbsp;soluciona agregando las siguientes lineas&amp;nbsp;en&amp;nbsp;los archivos &lt;b&gt;VsTestConfig.exe.config&lt;/b&gt; y &lt;b&gt;Devenv.exe.config&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;lt;appSettings&amp;gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;lt;add key=&quot;LoadTestCounterCategoryReadTimeout&quot; value=&quot;180000&quot;/&amp;gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;lt;add key=&quot;LoadTestCounterCategoryExistsTimeout&quot; value=&quot;180000&quot;/&amp;gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&amp;nbsp; &amp;lt;/appSettings&amp;gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/5001836084163582270/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2015/08/activar-contadores-de-rendimiento-en.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/5001836084163582270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/5001836084163582270'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2015/08/activar-contadores-de-rendimiento-en.html' title='Activar contadores de rendimiento en pruebas de carga'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgycWwwO6pPMOwhG6xVkHL2h9ElZmfx7miziLlNTuu7fwTLT0BG5Y6vCou6kcl1sth6dxB7vEVygTwKnzKnrWii9mAzfUuz77syKhHdu7S_w7xD4W8QVOSaOPDIb7wWhftBNO0aGiPxhzI/s72-c/Firewall.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-3783715578552417574</id><published>2015-07-23T15:33:00.000-05:00</published><updated>2015-07-23T16:36:04.786-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automáticamente"/><category scheme="http://www.blogger.com/atom/ns#" term="crear"/><category scheme="http://www.blogger.com/atom/ns#" term="Procedimiento Almacenado"/><category scheme="http://www.blogger.com/atom/ns#" term="reinicio"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER"/><title type='text'>Ejecutar un procedimiento al iniciar o reiniciar la instancia en Sql Server 2008</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
¿Alguna vez has necesitado que se ejecute un procedimiento almacenado apenas se inicie o reinicie la instancia? 
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Esta solución la necesité cuando tenía algunas tablas en la base de datos tempdb, que como saben se borran cada vez que se reinicia la instancia, por lo cual necesité garantizar que cada vez que se reiniciaba la instancia se crearan las tablas.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
¡Espero sea de utilidad!&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Nota&lt;/b&gt;: 

Debemos tener claro que solo podemos hacer que se ejecute un procedimiento almacenado, el cual no debe recibir parámetros y debe estar creado en la base de datos Master. Sin embargo este procedimiento almacenado puede realizar internamente operaciones sobre otras bases de datos.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1. Debemos verificar que el parámetro &lt;b&gt;&#39;scan for startup procs&#39; &lt;/b&gt;debe tener el valor &lt;b&gt;&#39;1&#39;&lt;/b&gt;, ¿Como verificamos el valor de este parámetro?

&lt;/div&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;USE MASTER
GO
SELECT VALUE, VALUE_IN_USE, DESCRIPTION 
FROM SYS.CONFIGURATIONS 
WHERE NAME = &#39;scan for startup procs&#39;
GO

&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8o0Qg-P-CDLykA3gQIpWYeQdgRFV6DEq22cv3mF4oI82rVZaAc8JjltcbaDSxKav4J2-MZgOhQSjLoO_NVY9aeJL22i8aDM0cqIGV0Xi6DJw00r50mKWHf1NInSQ0JufKIgcTbbBJ9k/s1600/iB_Sql.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;38&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8o0Qg-P-CDLykA3gQIpWYeQdgRFV6DEq22cv3mF4oI82rVZaAc8JjltcbaDSxKav4J2-MZgOhQSjLoO_NVY9aeJL22i8aDM0cqIGV0Xi6DJw00r50mKWHf1NInSQ0JufKIgcTbbBJ9k/s320/iB_Sql.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Si el resultado de la consulta es diferente a &lt;b&gt;&#39;1&#39;&lt;/b&gt;, no habrá problema, en el paso tres lo solucionaremos.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2. En este paso haremos el procedimiento almacenado que se ejecutará cuando se inicie/reinicie la instancia. Para este ejemplo crearemos un procedimiento que crea una tabla en la base de datos temporal.

&lt;/div&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;USE MASTER
GO
CREATE  PROCEDURE Usp_Create_Dummy as
DECLARE @sql VARCHAR(4000) =  &#39; &#39;
SET @sql  = @sql +  &#39;USE tempdb  &#39;
SET @sql  = @sql + CHAR(13)
SET @sql =  @sql +  &#39;SET ANSI_NULLS ON  &#39;
SET @sql  = @sql + CHAR(13)
SET @sql =  @sql +  &#39;SET QUOTED_IDENTIFIER ON  &#39;
SET @sql  = @sql + CHAR(13)
SET @sql =  @sql +  &#39;CREATE TABLE [dbo].[TablaDummy]( &#39;
SET @sql =  @sql +  &#39; [llave] [uniqueidentifier] NOT NULL, &#39;
SET @sql =  @sql +  &#39; [Valor] [ntext] NULL&#39;
SET @sql =  @sql +  &#39;)&#39;
SET @sql  = @sql + CHAR(13)
EXEC (@sql)
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3. Ahora asociaremos el procedimiento para que se ejecute cuando se inicie/reinicie la instancia:

&lt;/div&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;USE MASTER
GO
EXEC sp_procoption @ProcName = &#39;Usp_Create_Dummy&#39; , @OptionName =  &#39;startup&#39; , @OptionValue = &#39;on&#39;; 
GO

&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Al ejecutar el paso tres automáticamente el valor del parámetro &lt;b&gt;&#39;scan for startup procs&#39;&lt;/b&gt; cambiará a &lt;b&gt;&#39;1&#39;&lt;/b&gt; solo se debe reiniciar el servicio de Sql Server.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
4. El último punto es, ¿Como verificamos que nuestro procedimiento almacenado está en la lista de ejecución?, es muy sencillo con la siguiente consulta lo verificamos:

&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;SELECT name,create_date,modify_date
FROM sys.procedures
WHERE OBJECTPROPERTY(OBJECT_ID, &#39;ExecIsStartup&#39;) = 1
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwIiGzGiMFi27FhCe5hQrYA8_6BkISP21DzIxgOCPqBSgqD6xBQ4Kj8XsrDHVwyKdnMlyqCXc9y3i3Rotbla50z6KdqsAPeJ8Gyub0NB9NnDbWEkV1NozzOa_ZhWC0NYwLoAY9aHl2ls8/s1600/iB_Rc.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;15&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwIiGzGiMFi27FhCe5hQrYA8_6BkISP21DzIxgOCPqBSgqD6xBQ4Kj8XsrDHVwyKdnMlyqCXc9y3i3Rotbla50z6KdqsAPeJ8Gyub0NB9NnDbWEkV1NozzOa_ZhWC0NYwLoAY9aHl2ls8/s320/iB_Rc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Espero sea de utilidad.

</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/3783715578552417574/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2015/07/ejecutar-un-procedimiento-al-iniciar-o.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3783715578552417574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3783715578552417574'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2015/07/ejecutar-un-procedimiento-al-iniciar-o.html' title='Ejecutar un procedimiento al iniciar o reiniciar la instancia en Sql Server 2008'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8o0Qg-P-CDLykA3gQIpWYeQdgRFV6DEq22cv3mF4oI82rVZaAc8JjltcbaDSxKav4J2-MZgOhQSjLoO_NVY9aeJL22i8aDM0cqIGV0Xi6DJw00r50mKWHf1NInSQ0JufKIgcTbbBJ9k/s72-c/iB_Sql.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-8366700249317039908</id><published>2013-09-23T20:47:00.002-05:00</published><updated>2013-09-23T20:47:36.858-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="correo"/><category scheme="http://www.blogger.com/atom/ns#" term="email"/><category scheme="http://www.blogger.com/atom/ns#" term="enviar"/><category scheme="http://www.blogger.com/atom/ns#" term="gmail"/><title type='text'>Enviar correo electrónico desde C# con una cuenta de correo de gmail</title><content type='html'>El siguiente código permite enviar correo un electrónico desde C# con una cuenta de correo de gmail

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
 public void EnviarCorreoElectronico(String pAsunto, String pCuerpo)
        {
            using (MailMessage vMailMenssage = new MailMessage())
            {
                vMailMenssage.To.Add(new MailAddress(&quot;correo1@gmail.com&quot;));
                vMailMenssage.To.Add(new MailAddress(&quot;correo2@gmail.com&quot;));
                vMailMenssage.From = new MailAddress(&quot;MiCorreo@gmail.com&quot;);
                vMailMenssage.Subject = pAsunto;
                vMailMenssage.Body = pCuerpo;
                vMailMenssage.IsBodyHtml = true;
                vMailMenssage.Priority = MailPriority.High;

                using (SmtpClient vSmtpClient = new SmtpClient())
                {
                    vSmtpClient.Host = &quot;smtp.gmail.com&quot;;
                    vSmtpClient.Port = 587;
                    vSmtpClient.EnableSsl = true;
                    vSmtpClient.UseDefaultCredentials = true;
                    vSmtpClient.Credentials = new NetworkCredential(&quot;MiCorreo@gmail.com&quot;, &quot;EstaEsMiClave123&quot;);

                    vSmtpClient.Send(vMailMenssage);
                }
            }
        }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/8366700249317039908/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/09/enviar-correo-electronico-desde-c-con.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8366700249317039908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8366700249317039908'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/09/enviar-correo-electronico-desde-c-con.html' title='Enviar correo electrónico desde C# con una cuenta de correo de gmail'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-8669615378043913845</id><published>2013-07-31T09:01:00.000-05:00</published><updated>2013-07-31T09:01:36.669-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="browser"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="navegador"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Obtener información sobre las características del navegador que se ejecuta en el cliente</title><content type='html'>El siguiente código permite obtener información sobre las características del navegador que se ejecuta en el cliente:

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        System.Web.HttpBrowserCapabilities vBrowser = Request.Browser;

        //Navegador
        String vNombreNavegador = vBrowser.Browser;
        //Versión
        String vVersionNavegador = vBrowser.Version;
        //Sistema operativo o plataforma
        String vPalataformaNavegador = vBrowser.Platform;

        //Se pueden obtener características adicionales por medio del objeto HttpBrowserCapabilities, muchas de las características indican si el navegador es compatible con ellas, no si están activas en el cliente.
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/8669615378043913845/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/07/obtener-informacion-sobre-las.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8669615378043913845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8669615378043913845'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/07/obtener-informacion-sobre-las.html' title='Obtener información sobre las características del navegador que se ejecuta en el cliente'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-7202232815753687611</id><published>2013-07-31T08:22:00.000-05:00</published><updated>2013-07-31T08:22:45.197-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archivos"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Obtener los archivos de una carpeta</title><content type='html'>Lo siguiente nos permite obtener y recorrer todos los archivos de una carpeta específica:

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        //Nos indica la ruta del directorio donde queremos buscar los archivos
        String vPath = @&quot;C:\Users\Usuario\Downloads&quot;;

        //Recorremos los archivos que tiene el directorio 
        foreach (String vArchivo in Directory.GetFiles(vPath))
        {
            //Aquí manipulamos los archivos.
        }
&lt;/pre&gt;

Podemos realizar la búsqueda por una extensión particular, para este ejemplo todos los archivos .zip.


&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        //Nos indica la ruta del directorio donde queremos buscar los archivos
        String vPath = @&quot;C:\Users\Usuario\Downloads&quot;;

        //Recorremos los archivos que tiene el directorio que son .zip
        foreach (String vArchivo in Directory.GetFiles(vPath, &quot;*.zip&quot;))
        {
            //Aquí manipulamos los archivos.
        }

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/7202232815753687611/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/07/obtener-los-archivos-de-una-carpeta.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7202232815753687611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7202232815753687611'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/07/obtener-los-archivos-de-una-carpeta.html' title='Obtener los archivos de una carpeta'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-5262703832960293660</id><published>2013-06-05T08:38:00.001-05:00</published><updated>2013-06-05T08:38:56.043-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Cast"/><category scheme="http://www.blogger.com/atom/ns#" term="Code Behind"/><category scheme="http://www.blogger.com/atom/ns#" term="control de usuario"/><category scheme="http://www.blogger.com/atom/ns#" term="Controles de usuario"/><category scheme="http://www.blogger.com/atom/ns#" term="crear"/><category scheme="http://www.blogger.com/atom/ns#" term="dinámicamente"/><title type='text'>Crear controles de usuario (.ascx) dinámicamente o hacerle Cast desde el code behind</title><content type='html'>Cuando creamos un control de usuario (.ascx) a veces es necesario hacerle un Cast desde el code behind de la página, para crearlos dinámicamente o simplemente para buscarlo y cambiarle las propiedades de manera dinámica, este es el ejemplo de cómo se realiza en Cast:

Primero en el archivo .aspx donde vamos a usar el control, agregamos la referencia por medio de la siguiente linea:
&lt;pre class=&quot;brush: html; ruler: true; first-line: 11;&quot;&gt; 
&lt;%@ Register src=&quot;MiControlUsuario.ascx&quot; tagname=&quot;MiControlUsuario&quot; tagprefix=&quot;uc1&quot; %&gt;
&lt;/pre&gt;

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        //Como ejemplo, vamos a buscar el control de usuario creado con la línea anterior, 
        //para hacer el Cast usamos en namespace ASP. 
        //Para este caso en particular buscamos el ClientID y se lo asignamos a una variable.
        String vClientId = ((ASP.micontrolusuario_ascx)Page.FindControl(&quot;MiControlUsuario1&quot;)).ClientID;

        //También podríamos crear dinámicamente un nuevo control y agregarlo, de la siguiente manera:
        ASP.micontrolusuario_ascx vNuevoControlDinamico = new ASP.micontrolusuario_ascx();
        vNuevoControlDinamico.ID = &quot;MiControlGeneradoDinamicamente&quot;;
        Page.Controls.Add(vNuevoControlDinamico);
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/5262703832960293660/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/06/crear-controles-de-usuario-ascx.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/5262703832960293660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/5262703832960293660'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/06/crear-controles-de-usuario-ascx.html' title='Crear controles de usuario (.ascx) dinámicamente o hacerle Cast desde el code behind'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-8763173844007323128</id><published>2013-06-05T08:24:00.000-05:00</published><updated>2013-06-05T08:24:13.255-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="acentos"/><category scheme="http://www.blogger.com/atom/ns#" term="archivo"/><category scheme="http://www.blogger.com/atom/ns#" term="archivos"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="leer"/><category scheme="http://www.blogger.com/atom/ns#" term="tildes"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Leer archivos que contengan tildes o acentos</title><content type='html'>Es normal que debamos leer archivos que contiene texto con tildes o acentos, para que la lectura sea correcta y no se transformen en caracteres especiales podemos usar el siguiente código:

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        //Aqui colocamos la ruta del archivo que vamos a leer
        String vRutaArchivo = @&quot;C:\miArchivo.txt&quot;;
        //Usamos un StreamReader, en este caso recibe dos parámetros, el primero es la ruta del archivo y el segundo es la codificación con la cual lo vamos a leer
        //Para que reconozca las tildes es necesario colocarle la codificación por defecto

        using (StreamReader vStreamReader = new StreamReader(vRutaArchivo, System.Text.Encoding.Default))
        {
            //Aqui leemos todo el contenido del archivo y lo colocamos en una variable
            String vContenidoArchivo = vStreamReader.ReadToEnd();
        }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/8763173844007323128/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/06/leer-archivos-que-contengan-tildes-o.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8763173844007323128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8763173844007323128'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/06/leer-archivos-que-contengan-tildes-o.html' title='Leer archivos que contengan tildes o acentos'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-421792275083372403</id><published>2013-05-14T19:00:00.000-05:00</published><updated>2013-05-22T15:10:43.491-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archivos"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="cambiar"/><category scheme="http://www.blogger.com/atom/ns#" term="transformar"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><category scheme="http://www.blogger.com/atom/ns#" term="unicode"/><title type='text'>Cambiar codificación de archivo de texto a Unicode</title><content type='html'>Con el siguiente fragmento de código es posible cambiarle la codificación a Unicode a un archivo de texto:

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
     try
        {
            String vTemp = &quot;&quot;;
            using (StreamReader sr = new StreamReader(@&quot;C:\Prueba.txt&quot;))
            {
                vTemp = sr.ReadToEnd();
 
            }
            using (StreamWriter sw = new StreamWriter(@&quot;C:\Prueba.txt&quot;, false, Encoding.Unicode))
            {
                sw.Write(vTemp);
            }
        }
        catch (Exception ex)
        {
            //aqui si algo sale mal, el ex.Message tiene la informacion del mensaje
        }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/421792275083372403/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2013/05/cambiar-codificacion-de-archivo-de.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/421792275083372403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/421792275083372403'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2013/05/cambiar-codificacion-de-archivo-de.html' title='Cambiar codificación de archivo de texto a Unicode'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-1862496926982335241</id><published>2012-08-26T16:15:00.000-05:00</published><updated>2016-07-18T17:18:28.342-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="ima"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><category scheme="http://www.blogger.com/atom/ns#" term="Utilidad"/><title type='text'>Obtener tamaño de una imagen en c#</title><content type='html'>La siguiente función permite obtener el tamaño de una imagen,  recibe un parámetro tipo char, para determinar si el tamaño se retorna en bytes, kilobytes o megabytes.
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 

    public long ObtenerTamanoImagen(System.Drawing.Image vImage, char vMedida)
    {
        long vTamano = 0;
        long vTamanoBytes;
        if (vImage != null)
        {
            using (MemoryStream vMemoryStream = new MemoryStream())
            {
                vImage.Save(vMemoryStream, ImageFormat.Png);
                vTamanoBytes = vMemoryStream.Length;
                switch (vMedida)
                {
                    case &#39;b&#39;:
                        vTamano = vTamanoBytes;
                        break;
                    case &#39;k&#39;:
                        vTamano = vTamanoBytes / 1204;
                        break;
                    case &#39;m&#39;:
                        vTamano = vTamanoBytes / 1024 / 1024;
                        break;
                }
            }
        }
        return vTamano;
    }

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/1862496926982335241/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/08/obtener-tamano-de-una-imagen-en-c.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1862496926982335241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1862496926982335241'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/08/obtener-tamano-de-una-imagen-en-c.html' title='Obtener tamaño de una imagen en c#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-8440905109108075246</id><published>2012-08-26T16:12:00.000-05:00</published><updated>2012-08-26T16:12:29.602-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="imagen"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><category scheme="http://www.blogger.com/atom/ns#" term="Utilidad"/><title type='text'>Cambiar tamaño de una imagen en c#</title><content type='html'>La siguiente función permite cambiar el tamaño de una imagen, guardando la calidad de la misma.

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        public Image CambiarTamanoImagen(Image pImagen, int pAncho, int pAlto)
        {
            //creamos un bitmap con el nuevo tamaño
            Bitmap vBitmap = new Bitmap(pAncho, pAlto);
            //creamos un graphics tomando como base el nuevo Bitmap
            using (Graphics vGraphics = Graphics.FromImage((Image)vBitmap))
            {
                //especificamos el tipo de transformación, se escoge esta para no perder calidad.
                vGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
                //Se dibuja la nueva imagen
                vGraphics.DrawImage(pImagen, 0, 0, pAncho, pAlto);
            }
            //retornamos la nueva imagen
            return (Image)vBitmap;
        }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/8440905109108075246/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/08/cambiar-tamano-de-una-imagen-en-c.html#comment-form' title='10 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8440905109108075246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/8440905109108075246'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/08/cambiar-tamano-de-una-imagen-en-c.html' title='Cambiar tamaño de una imagen en c#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-7188641896686584520</id><published>2012-04-25T14:57:00.000-05:00</published><updated>2012-04-25T14:57:39.255-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linea"/><category scheme="http://www.blogger.com/atom/ns#" term="Reporting Services 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="StripLine"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Agregar líneas en los ejes de las graficas, Reporting Services</title><content type='html'>Agregar líneas en los ejes de las graficas, a veces es necesario agregar líneas en los ejes de la grafica que nos permitan marcar un valor determinado a la grafica.
El siguiente ejemplo explica cómo hacerlo en Reporting Services 2008:
La grafica que se va a usar de ejemplo muestra la cantidad de animales así:

 &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUpiQa1FVEblIk_3CollwRx0laHWUaR64BSxiLYUI1TMqijGY38grZEyWLLJXC6nYXfK3sjk_XVs2L_e2N6oqL1Bm9mLmfucsY9xWU4MoVb9CWYdRKAxpJc8V3yEK7jf8CK9ODA8SdpU/s1600/rp1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;154&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUpiQa1FVEblIk_3CollwRx0laHWUaR64BSxiLYUI1TMqijGY38grZEyWLLJXC6nYXfK3sjk_XVs2L_e2N6oqL1Bm9mLmfucsY9xWU4MoVb9CWYdRKAxpJc8V3yEK7jf8CK9ODA8SdpU/s320/rp1.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; 

Vamos a agregar una línea que recorra la grafica en sentido horizontal, mostrando el límite permitido, para hacerlo seguimos los siguientes pasos:
1. Seleccionamos el eje Y:


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr72SgLkA6yJGOidSzFdrg6q7FNsPv0vW9lDQEy_Ga58b2WP_U0rjXf7xx0Vlxn3L15Gef2aE3rlgMF5nsVtMKYPFftgo8dcxqVFjptlQggXaOKRqXAG93Z_Z9exVyWVop9zwGEiyv9qg/s1600/rp2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;185&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr72SgLkA6yJGOidSzFdrg6q7FNsPv0vW9lDQEy_Ga58b2WP_U0rjXf7xx0Vlxn3L15Gef2aE3rlgMF5nsVtMKYPFftgo8dcxqVFjptlQggXaOKRqXAG93Z_Z9exVyWVop9zwGEiyv9qg/s320/rp2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



2. Vamos a las propiedades del eje Y y buscamos la propiedad StripLines:
 

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrNwR3UJsGBRcfXCGJlR2xlEXgpW6OfdAOAkRcxvWJuy8rz9n7tPadUWTIClR15MjtB22TqS3fja2Zimrny-QiQr6G7wrk3FYGJAw9C-CBjy_KmdDNb_FjJvXJqEjMqbeSDNTPEOBRRkk/s1600/rp3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrNwR3UJsGBRcfXCGJlR2xlEXgpW6OfdAOAkRcxvWJuy8rz9n7tPadUWTIClR15MjtB22TqS3fja2Zimrny-QiQr6G7wrk3FYGJAw9C-CBjy_KmdDNb_FjJvXJqEjMqbeSDNTPEOBRRkk/s320/rp3.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



3. En las propiedades cambiamos los siguientes campos:
• En la propiedad BorderColor seleccionamos el color de la línea
• En la propiedad BorderStyle seleccionamos el tipo de línea
• En la propiedad IntervalOffSet seleccionamos el valor al cual aparecerá la línea
Así:
 
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgykRFI0vScwqoj5qNsgM9kJrm_lIrjsStwIkJA7CZkR_vgSISWj_G1uiSBLDL-XsB55n_ZVH2nuU4s0bP7KqCwu72pQTvvqfbni9x0q-aWv8M7JnZyc2g-UYi3NdLujDGXGt3hvMDjiTc/s1600/rp4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;229&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgykRFI0vScwqoj5qNsgM9kJrm_lIrjsStwIkJA7CZkR_vgSISWj_G1uiSBLDL-XsB55n_ZVH2nuU4s0bP7KqCwu72pQTvvqfbni9x0q-aWv8M7JnZyc2g-UYi3NdLujDGXGt3hvMDjiTc/s320/rp4.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



Aceptamos los cambios y al ejecutar el reporte ahora lucirá así:

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxAM1ni30xLBMEAmd8OwUQJ0rwYrvf1lvLCTSiTbtr8sh67JOE7iJrp3ZnnuQuuvrKLITZxPC3NcTh5a5Jgu9fTOAO0hP-jIcnTeghnsqOgxZSf09uxhQd9-2sJIxrSr3wdIvErE1WDGE/s1600/rp5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;155&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxAM1ni30xLBMEAmd8OwUQJ0rwYrvf1lvLCTSiTbtr8sh67JOE7iJrp3ZnnuQuuvrKLITZxPC3NcTh5a5Jgu9fTOAO0hP-jIcnTeghnsqOgxZSf09uxhQd9-2sJIxrSr3wdIvErE1WDGE/s320/rp5.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


 
El valor en el cual sale la línea (Para este ejemplo 4), puede ser cambiado o asignado por medio de un parámetro o con los resultados de una consulta.</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/7188641896686584520/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/04/agregar-lineas-en-los-ejes-de-las.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7188641896686584520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7188641896686584520'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/04/agregar-lineas-en-los-ejes-de-las.html' title='Agregar líneas en los ejes de las graficas, Reporting Services'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUpiQa1FVEblIk_3CollwRx0laHWUaR64BSxiLYUI1TMqijGY38grZEyWLLJXC6nYXfK3sjk_XVs2L_e2N6oqL1Bm9mLmfucsY9xWU4MoVb9CWYdRKAxpJc8V3yEK7jf8CK9ODA8SdpU/s72-c/rp1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-3325313107290695302</id><published>2012-04-16T09:45:00.000-05:00</published><updated>2012-04-16T09:45:15.355-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="cadena"/><category scheme="http://www.blogger.com/atom/ns#" term="StringBuilder"/><category scheme="http://www.blogger.com/atom/ns#" term="Utilidad"/><title type='text'>Uso de la clase StringBuilder</title><content type='html'>Dentro de .Net, los objetos String siempre tienen una longitud determinada, cada vez que se realizan operaciones sobre cadenas se crea una nueva cadena con el resultado de la operación, cuando se efectúan múltiples operaciones sobre las mismas el rendimiento puede verse afectado. En estos casos para evitar que se afecte el rendimiento se puede usar la clase StringBuilder, que contiene las siguientes operaciones: &lt;br /&gt;
&lt;br /&gt;

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt; 
        //Se crea el StringBuilder con el valor inicial
        StringBuilder vStringBuilder = new StringBuilder(&quot;Cadena Inicial:&quot;);
        //Contenido del StringBuilder: Cadena Inicial:
        //Con el método Append se agrega al final del valor inicial
        vStringBuilder.Append(&quot; Sumando a la cadena.&quot;);
        //Contenido del StringBuilder: Cadena Inicial: Sumando a la cadena.
        //Con el método Remove se eliminan caracteres de la cadena
        vStringBuilder.Remove(0, 16);
        //Contenido del StringBuilder: Sumando a la cadena.
        //Con el método Replace se remplazan caracteres o subcadenas completas
        vStringBuilder.Replace(&quot;Sumando&quot;, &quot;Restando&quot;);
        //Contenido del StringBuilder: Restando a la cadena.
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/3325313107290695302/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/04/uso-de-la-clase-stringbuilder.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3325313107290695302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3325313107290695302'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/04/uso-de-la-clase-stringbuilder.html' title='Uso de la clase StringBuilder'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-6990505153664858310</id><published>2012-03-11T19:28:00.001-05:00</published><updated>2012-03-11T19:28:36.176-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fecha actual"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Obtener la fecha actual en php</title><content type='html'>Así se obtiene la fecha actual en php
&lt;br /&gt;
&lt;pre class=&quot;brush: php; ruler: true; first-line: 1;&quot;&gt;
&lt;?php
 //Se puede cambiar el formato con la cadena que recibe como parámetro la función 
 echo date(&quot;d-m-Y&quot;);
?&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/6990505153664858310/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/03/asi-se-obtiene-la-fecha-actual-en-php.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6990505153664858310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6990505153664858310'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/03/asi-se-obtiene-la-fecha-actual-en-php.html' title='Obtener la fecha actual en php'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-7654269034300605430</id><published>2012-03-11T19:20:00.004-05:00</published><updated>2012-03-11T19:26:59.517-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="switch"/><category scheme="http://www.blogger.com/atom/ns#" term="truco"/><title type='text'>Ejemplo de switch en php</title><content type='html'>Este es un ejemplo de uso del switch en php
&lt;br /&gt;
&lt;pre class=&quot;brush: php; ruler: true; first-line: 1;&quot;&gt;
&lt;?php
  $mes = &quot;&quot;; //Variable mes donde guardaremos el mes como cadena
  //date(&quot;m&quot;) con esta instrucción obtenemos el mes actual

  //Dentro de los paréntesis se coloca el valor a evaluar
  //Por cada posible opción a evaluar se coloca un case, finalizado por la palabra clave break

  switch(date(&quot;m&quot;)){
   case &quot;01&quot;: 
  $mes = &quot;Enero&quot;;
 break;
   case &quot;02&quot;: 
  $mes = &quot;Febrero&quot;;
 break;
   case &quot;03&quot;: 
  $mes = &quot;Marzo&quot;;
 break;
   case &quot;04&quot;: 
  $mes = &quot;Abril&quot;;
 break;
   case &quot;05&quot;: 
  $mes = &quot;Mayo&quot;;
 break;
   case &quot;06&quot;: 
  $mes = &quot;Junio&quot;;
 break;
   case &quot;07&quot;: 
  $mes = &quot;Julio&quot;;
 break;
   case &quot;08&quot;: 
  $mes = &quot;Agosto&quot;;
 break;
   case &quot;09&quot;: 
  $mes = &quot;Septiembre&quot;;
 break;
   case &quot;10&quot;: 
  $mes = &quot;Octubre&quot;;
 break;
   case &quot;11&quot;: 
  $mes = &quot;Noviembre&quot;;
 break;
   case &quot;12&quot;: 
  $mes = &quot;Diciembre&quot;;
 break;
        //Cuando ninguna condición se cumple
        default:
                $mes = &quot;Error&quot;;
        break;
  }
?&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/7654269034300605430/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2012/03/ejemplo-de-switch-en-php.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7654269034300605430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7654269034300605430'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2012/03/ejemplo-de-switch-en-php.html' title='Ejemplo de switch en php'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-646416606143604948</id><published>2011-09-30T11:05:00.002-05:00</published><updated>2011-09-30T11:05:03.974-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Integration Services"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="Utilidad"/><title type='text'>Ejecutar una ETL de integration Services desde C#</title><content type='html'>El siguiente fragmento de código permite ejecutar una ETL de Integration Services desde C#, se usa la referencia Microsoft.SQLServer.ManagedDTS. &lt;br /&gt;

&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt;    
            //Creamos una aplicación para realizar la ejecución
            Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
           //Creamos un paquete y le asignamos el que queremos ejecutar
            Package package = app.LoadPackage(@&quot;C:\Users\JI\ETLS\Package.dtsx&quot;, null);
           //Ejecutamos el paquete
            DTSExecResult result = package.Execute();  
           //Imprimimos el resultado de la ejecución
            Console.WriteLine(&quot;Resultado de la ejecución: {0}&quot;, result.ToString());
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/646416606143604948/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/09/ejecutar-una-etl-de-integration.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/646416606143604948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/646416606143604948'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/09/ejecutar-una-etl-de-integration.html' title='Ejecutar una ETL de integration Services desde C#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-3705215801717976364</id><published>2011-07-01T15:17:00.000-05:00</published><updated>2011-07-01T15:17:53.635-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archivos"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="copiar"/><title type='text'>Como copiar un archivo en C#</title><content type='html'>&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt;        //Declaramos un FileInfo colocando la ruta del archivo que se va a copiar
        FileInfo vArchivo = new FileInfo(@&quot;C:\tmp\MiArchivo.sql&quot;);
        //Realizamos el copiado indicando la ruta y el nombre del nuevo archivo
        vArchivo.CopyTo(@&quot;C:\tmp\MiArchivoCopia.sql&quot;);
        //Y el archivo queda copiado
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/3705215801717976364/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/07/como-copiar-un-archivo-en-c.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3705215801717976364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/3705215801717976364'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/07/como-copiar-un-archivo-en-c.html' title='Como copiar un archivo en C#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-6728116570857915053</id><published>2011-07-01T15:00:00.002-05:00</published><updated>2011-07-01T15:13:37.978-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="ordenamiento"/><category scheme="http://www.blogger.com/atom/ns#" term="vector"/><title type='text'>Ordenamiento de vectores en C#</title><content type='html'>Muchas veces es necesario ordenar un vector, C# tiene una manera sencilla para lograrlo:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt;//Creamos un vector de enteros
        int[] vArray = { 3, 4, 2, 1 };
        //Inicializamos una cadena con valores separados con comas
        String vCadena = &quot;Felipe,Diana,Claudia,Fernanda&quot;;
        //Realizamos un Split para obtener los diferentes valores 
        //que estaban dentro de la cadena y colocarlos dentro de un vector
        String[] vArrayCadena = vCadena.Split(&#39;,&#39;);

        //Para ordenar el vector usamos el siquiente metodo
        Array.Sort(vArray);
        //Si imprimimos el vector vArray este sería el resultado:
        //1,2,3,4

        //Para ordenar el vector usamos el siquiente metodo
        Array.Sort(vArrayCadena);
        //Si imprimimos el vector vArrayCadena este sería el resultado:
        //Claudia, Diana, Felipe, Fernanda
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/6728116570857915053/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/07/ordenamiento-de-vectores-en-c.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6728116570857915053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6728116570857915053'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/07/ordenamiento-de-vectores-en-c.html' title='Ordenamiento de vectores en C#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-687463075038334853</id><published>2011-06-30T22:12:00.001-05:00</published><updated>2011-06-30T22:16:40.446-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clase"/><category scheme="http://www.blogger.com/atom/ns#" term="conexión"/><category scheme="http://www.blogger.com/atom/ns#" term="MySql"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Clase de conexión a MySQL desde php.</title><content type='html'>Este es un ejemplo de cómo se realiza la conexión entre php y MySql usando objetos.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php; ruler: true; first-line: 1;&quot;&gt;&lt;?php

class conexion{

 //Nombre o dirección IP del servidor de Bases de Datos
 var $host;
 //Usuario con el cual se realizara la conexión
 var $usuario;
 //Contraseña del usuario con el cual se realizara la conexión
 var $passw;
 //Nombre de la Base de Datos
 var $baseDatos;
 //Variable donde se almacenara la conexión
 var $link;
 
 //Constructor de la clase
 //Asigna los valores a las variables
 function conexion(){
  $this-&gt;host = &quot;localhost&quot;;
  $this-&gt;usuario = &quot;usuario&quot;;
  $this-&gt;passw = &quot;contraseña&quot;;
  $this-&gt;baseDatos = &quot;nombreBaseDeDatos&quot;;
 }
 //Función que realiza la conexión con la Base de Datos
 function conectar(){
  if (!($this-&gt;link=mysql_connect($this-&gt;host,$this-&gt;usuario,$this-&gt;passw))){ 
      //Si no logra establecer conexión retorna un mensaje de error
        echo &quot;Error conectando a la base de datos.&quot;; 
        exit(); 
     }
  if (!mysql_select_db($this-&gt;baseDatos, $this-&gt;link)){
   //Si el nombre de la base de datos es erróneo devuelve un mensaje de error
        echo &quot;Error seleccionando la base de datos.&quot;; 
        exit(); 
     }
 }
 //Función que cierra la conexión con la Base de Datos
 function cerrarConexion(){
  mysql_close($this-&gt;link);
 }
 //Función que ejecuta una consulta SQL y devuelve los resultados de la misma
 function ejecutarConsulta($consulta){
  $result = mysql_query($consulta, $this-&gt;link); 
  return $result;
 }
}
?&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/687463075038334853/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/clase-de-conexion-mysql-desde-php.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/687463075038334853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/687463075038334853'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/clase-de-conexion-mysql-desde-php.html' title='Clase de conexión a MySQL desde php.'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-1636963684251516241</id><published>2011-06-30T09:58:00.000-05:00</published><updated>2011-06-30T09:58:06.746-05:00</updated><title type='text'>Enumerados en C#</title><content type='html'>Un enumerado es un tipo de dato definido por el usuario que permite agrupar un conjunto de valores asignándoles un nombre. &lt;br /&gt;
&lt;br /&gt;
Los enumerados facilitan el proceso de codificación debido a que se hace referencia a ellos por el nombre y no por el valor.&lt;br /&gt;
&lt;br /&gt;
Declarar una enumeración:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 11;&quot;&gt;    //Si se definen de esta manera, le asignara un entero a cada valor empezando por 0.
    enum tipoDocumento : int { CC , TI, PAS, CE };
    //De esta manera le asignamos de manera explícita el valor que va tener cada atributo
    enum tipoDocumento : int { CC = 10, TI = 20, PAS = 30, CE = 40 };
    //
&lt;/pre&gt;&lt;br /&gt;
Uso del enumerado:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 1;&quot;&gt;    tipoDocumento vTipDocUsuario = tipoDocumento.CC;
    //Obtener el valor interno del enumerado
    int vTipoDocumento = (int)vTipDocUsuario;
    //
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/1636963684251516241/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/enumerados-en-c.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1636963684251516241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/1636963684251516241'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/enumerados-en-c.html' title='Enumerados en C#'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-7041401335872218501</id><published>2011-06-29T15:18:00.000-05:00</published><updated>2011-06-29T15:18:58.487-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="agrega"/><category scheme="http://www.blogger.com/atom/ns#" term="archivos"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="cadena"/><category scheme="http://www.blogger.com/atom/ns#" term="texto"/><title type='text'>Método en C# que agrega una cadena a un archivo de texto existente.</title><content type='html'>Este método permite insertar una nueva línea a un archivo de texto, si el archivo no existe lo crea en la ruta especificada.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 10;&quot;&gt;    //pCadena: Es la cadena de caracteres que vamos a insertar en el archivo
    //pRutaArchivo: Es la ruta absoluta se encuentra el archivo. Ejemplo: C:\tmp\prueba.txt
    public void guardarEnArchivo(String pCadena, String pRutaArchivo)
    {
        try
        {
            //Si existe el archivo le agrega la cadena al final, si no existe lo crea.
            StreamWriter vWriter = File.AppendText(pRutaArchivo);
            vWriter.WriteLine(pCadena);
            vWriter.Close();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/7041401335872218501/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/metodo-en-c-que-agrega-una-cadena-un.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7041401335872218501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/7041401335872218501'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/metodo-en-c-que-agrega-una-cadena-un.html' title='Método en C# que agrega una cadena a un archivo de texto existente.'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-6056249271414191410</id><published>2011-06-29T15:01:00.000-05:00</published><updated>2011-09-30T11:09:05.249-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="consulta"/><category scheme="http://www.blogger.com/atom/ns#" term="esquema"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER"/><title type='text'>Consulta que nos permite listar todas las tablas de una base de datos en SQL SERVER.</title><content type='html'>Esta consulta es útil cuando necesitamos conocer el listado de las tablas de una base de datos determinada.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;  SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE 
  FROM Information_Schema.Tables
  WHERE TABLE_TYPE = &#39;BASE TABLE&#39;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/6056249271414191410/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/consulta-que-nos-permite-listar-todas.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6056249271414191410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6056249271414191410'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/consulta-que-nos-permite-listar-todas.html' title='Consulta que nos permite listar todas las tablas de una base de datos en SQL SERVER.'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-556309713558240066</id><published>2011-06-29T12:25:00.007-05:00</published><updated>2011-06-30T22:53:52.555-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="consulta"/><category scheme="http://www.blogger.com/atom/ns#" term="registros"/><category scheme="http://www.blogger.com/atom/ns#" term="repetidos"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>Consulta para buscar registros repetidos.</title><content type='html'>Muchas veces es necesario establecer cuantas veces un registro con características similares está almacenado  en nuestra tabla, la siguiente consulta nos permite hacerlo.&lt;br /&gt;
&lt;br /&gt;
En este ejemplo vamos a buscar dentro de la tabla Persona los registros que tengan el tipo de documento y número documento repetido así:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: sql; ruler: true; first-line: 1&quot;&gt;SELECT tipo_documento,numero_documento, COUNT(1)  
FROM Persona  
GROUP BY tipo_documento,numero_documento  
HAVING COUNT(1) 
&lt;/pre&gt;&lt;br /&gt;
Esta consulta nos devolverá el tipo de documento, número de documento y el número de veces que se repite.&lt;br /&gt;
&lt;br /&gt;
Además, la sentencia COUNT(1) no siempre debe aparecer en el SELECT, esto en caso que solo se requiera identificar los repetidos, pero no su cantidad de apariciones.</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/556309713558240066/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/consulta-para-buscar-registros.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/556309713558240066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/556309713558240066'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/consulta-para-buscar-registros.html' title='Consulta para buscar registros repetidos.'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2645906135710799567.post-6912012774644064354</id><published>2011-06-29T11:58:00.000-05:00</published><updated>2011-06-29T11:58:26.922-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Método"/><category scheme="http://www.blogger.com/atom/ns#" term="Utilidad"/><title type='text'>Método realizado en c# para verificar si un archivo existe.</title><content type='html'>El siguiente método realizado en c# verifica si un archivo se encuentra almacenado en una ruta determinada.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp; ruler: true; first-line: 10;&quot;&gt;    //La ruta debe ser absoluta y además estar completa
    //Ejemplo: C:\temp\Script-Zurich.bat
    public Boolean existeArchivo(String pPathArchivo)
    {
        try
        {
            if (File.Exists(pPathArchivo))
                return true;
            else
                return false;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://byteride.blogspot.com/feeds/6912012774644064354/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://byteride.blogspot.com/2011/06/metodo-realizado-en-c-para-verificar-si.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6912012774644064354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2645906135710799567/posts/default/6912012774644064354'/><link rel='alternate' type='text/html' href='http://byteride.blogspot.com/2011/06/metodo-realizado-en-c-para-verificar-si.html' title='Método realizado en c# para verificar si un archivo existe.'/><author><name>JI</name><uri>http://www.blogger.com/profile/07370271659832821995</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>