<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lopezatienza.es</title>
	<atom:link href="http://www.lopezatienza.es/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lopezatienza.es</link>
	<description>Programación en VB.NET, C#.NET..</description>
	<lastBuildDate>Thu, 12 Apr 2012 12:33:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Visual Basic .NET &#8211; Transacción con SqlConnection</title>
		<link>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-transaccion-con-sqlconnection/</link>
		<comments>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-transaccion-con-sqlconnection/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 12:33:34 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Visual Basic .NET]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=207</guid>
		<description><![CDATA[
Dim conexion As SqlConnection = Nothing
Dim transaccion As SqlTransaction = Nothing

Try
conexion = New SqlConnection(&#34;ConnectionString&#34;)
conexion.Open()
transaccion = conexion.BeginTransaction()

'Lógica de negocio

transaccion.Commit()
transaccion = Nothing
conexion.Close()
conexion = Nothing
Catch ex As Exception
If (Not IsNothing(transaccion)) Then
transaccion.Rollback()
transaccion = Nothing
End If
If (Not IsNothing(conexion)) Then
conexion.Close()
conexion = Nothing
End If
End Try

]]></description>
			<content:encoded><![CDATA[<pre class="brush: vb; title: ; notranslate">
Dim conexion As SqlConnection = Nothing
Dim transaccion As SqlTransaction = Nothing

Try
conexion = New SqlConnection(&quot;ConnectionString&quot;)
conexion.Open()
transaccion = conexion.BeginTransaction()

'Lógica de negocio

transaccion.Commit()
transaccion = Nothing
conexion.Close()
conexion = Nothing
Catch ex As Exception
If (Not IsNothing(transaccion)) Then
transaccion.Rollback()
transaccion = Nothing
End If
If (Not IsNothing(conexion)) Then
conexion.Close()
conexion = Nothing
End If
End Try
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-transaccion-con-sqlconnection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Basic .NET &#8211; Carga de Nodos en TreeView a Demanda</title>
		<link>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-carga-de-nodos-en-treeview-a-demanda/</link>
		<comments>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-carga-de-nodos-en-treeview-a-demanda/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 12:24:02 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Visual Basic .NET]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=238</guid>
		<description><![CDATA[Comentarios
En este proyecto voy a mostrar la forma, desde mi punto de vista, más elegante de realizar cargas de TreeView mediante un BackgroundWorker utilizando un modelo Maestro / Controlador que tomo como ejemplo Familia de Materiales y Materiales.
La aplicación está desarrollada en VS 2005 Framework 2.0 y accede a un Libro de Excel 8.0


Código
'''
''' Aplicación [...]]]></description>
			<content:encoded><![CDATA[<h2>Comentarios</h2>
<p>En este proyecto voy a mostrar la forma, desde mi punto de vista, más elegante de realizar cargas de TreeView mediante un BackgroundWorker utilizando un modelo Maestro / Controlador que tomo como ejemplo Familia de Materiales y Materiales.</p>
<p>La aplicación está desarrollada en VS 2005 Framework 2.0 y accede a un Libro de Excel 8.0</p>
<p><span id="more-238"></span></p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/CargaDeTreeViewADemanda[01].png" alt="" width="473" height="514" /></p>
<h2>Código</h2>
<p>'''<br />
''' Aplicación desarrollada por Antonio López Atienza (http://www.lopezatienza.es) Marzo 2012<br />
''' El código contenido en este proyecto está tal cual sin garantías de ninguna clase.<br />
''' Usted asume cualquier riesgo al poner en práctica, utilizar o ejecutar dicho Proyecto.<br />
'''<br />
'''<br />
Public Class frmPrincipal</p>
<p>#Region "Variables Globales"</p>
<p>Dim vConn As New OleDb.OleDbConnection<br />
Dim vCmd As New OleDb.OleDbCommand<br />
Dim vDa As New OleDb.OleDbDataAdapter<br />
Dim vDs As New DataSet</p>
<p>Dim vCargaMaestro As Boolean = True<br />
Dim vNodoSeleccionado As New TreeNode<br />
Dim cuenta As Integer = 100</p>
<p>#End Region</p>
<p>#Region "Manejadores de evenos del Formulario"</p>
<p>Private Sub frmPrincipal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Try<br />
Me.picCargando.Visible = True<br />
Me.tvMain.Enabled = False<br />
BackgroundWorker1.RunWorkerAsync()<br />
Catch ex As Exception<br />
MessageBox.Show("Excepción controlada: " &amp; ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)<br />
End Try<br />
End Sub</p>
<p>Private Sub tvMain_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvMain.AfterSelect<br />
Try<br />
vNodoSeleccionado = e.Node</p>
<p>''Comprobamos que no esté seleccionando un hijo<br />
If vNodoSeleccionado.Parent Is Nothing Then<br />
''Comprobamos que no se hayan cargado ya los hijos<br />
If vNodoSeleccionado.Nodes.Count = 0 Then<br />
' Abrir la conexión, y leer [Hoja 1] del archivo Excel<br />
vCargaMaestro = False<br />
Me.picCargando.Visible = True<br />
Me.tvMain.Enabled = False<br />
BackgroundWorker1.RunWorkerAsync()<br />
End If<br />
End If</p>
<p>Catch ex As Exception<br />
'Aqui va el código que controle la excepción<br />
Finally<br />
vConn.Close()<br />
End Try<br />
End Sub</p>
<p>#End Region</p>
<p>#Region "Funciones del BackgroundWorker"</p>
<p>Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork<br />
Try<br />
Dim i As Integer<br />
If vCargaMaestro Then<br />
CargarDatosMaestro()</p>
<p>cuenta = vDs.Tables("FamiliaMateriales").Rows.Count<br />
For Each vFamilia As DataRow In vDs.Tables("FamiliaMateriales").Rows<br />
Dim vNodoMain As New TreeNode<br />
vNodoMain.Name = vFamilia.Item("IDFamilia")<br />
vNodoMain.Text = vFamilia.Item("Nombre")<br />
AddNode(vNodoMain)</p>
<p>Threading.Thread.Sleep(250)<br />
BackgroundWorker1.ReportProgress(100 * i / cuenta, "Procesando (" &amp; i &amp; "/" &amp; cuenta &amp; ") elementos...")<br />
i += 1<br />
'Me.tvMain.Nodes.Add(vFamilia.Item("IDFamilia"), vFamilia.Item("Nombre"))<br />
Next<br />
Else<br />
CargarDatosDetalle()</p>
<p>cuenta = vDs.Tables("Materiales").Rows.Count<br />
For Each vFilaMaterial As DataRow In vDs.Tables("Materiales").Rows<br />
Dim vNodoMain As New TreeNode<br />
vNodoMain.Name = vFilaMaterial.Item("IDMaterial")<br />
vNodoMain.Text = vFilaMaterial.Item("Nombre")<br />
AddNode(vNodoMain)</p>
<p>Threading.Thread.Sleep(250)<br />
BackgroundWorker1.ReportProgress(100 * i / cuenta, "Procesando (" &amp; i &amp; "/" &amp; cuenta &amp; ") elementos...")<br />
i += 1<br />
'vNodoSeleccionado.Nodes.Add(vFilaMaterial.Item("IDMaterial"), vFilaMaterial.Item("Nombre"))<br />
Next<br />
End If</p>
<p>BackgroundWorker1.ReportProgress(100, "Completado!")<br />
e.Result = True<br />
Catch ex As Exception<br />
e.Result = False<br />
End Try<br />
End Sub</p>
<p>Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted<br />
Try<br />
Me.picCargando.Visible = False<br />
Me.tvMain.Enabled = True<br />
Catch ex As Exception<br />
'Me.btnIniciar.Enabled = True<br />
MessageBox.Show("Excepción controlada: " &amp; ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)<br />
End Try<br />
End Sub</p>
<p>Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As System.Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged<br />
Try<br />
BarraDeProgreso.Value = e.ProgressPercentage<br />
lblProgreso.Text = e.UserState<br />
Catch ex As Exception<br />
MessageBox.Show("Excepción controlada: " &amp; ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)<br />
End Try<br />
End Sub</p>
<p>#End Region</p>
<p>#Region "Cargas de datos"</p>
<p>Function CargarDatosMaestro() As Boolean<br />
Try<br />
''Comprobar si el archivo existe<br />
If System.IO.File.Exists(Application.StartupPath &amp; "\Datos.xls") Then</p>
<p>vConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp; Application.StartupPath &amp; "\Datos.xls; Extended Properties= Excel 8.0;"</p>
<p>''Conectamos con el Libro Excel y accedemos a la Hoja [FamiliaMateriales$]<br />
vConn.Open()<br />
vCmd.CommandText = "SELECT * FROM [FamiliaMateriales$]"<br />
vCmd.Connection = vConn<br />
vDa.SelectCommand = vCmd</p>
<p>'Llenar el DataSet<br />
vDa.Fill(vDs, "FamiliaMateriales")<br />
Return True<br />
Else<br />
Return False<br />
End If<br />
Catch ex As Exception<br />
'Aqui va el código que controle la excepción<br />
Finally<br />
vConn.Close()<br />
End Try<br />
End Function</p>
<p>Function CargarDatosDetalle() As Boolean<br />
Try<br />
''Comprobar si el archivo existe<br />
If System.IO.File.Exists(Application.StartupPath &amp; "\Datos.xls") Then<br />
'Dimensionar los elementos necesarios para leer y cargar los datos</p>
<p>vConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp; Application.StartupPath &amp; "\Datos.xls; Extended Properties= Excel 8.0;"</p>
<p>''Conectamos con el Libro Excel y accedemos a la Hoja [FamiliaMateriales$]<br />
vConn.Open()<br />
vCmd.CommandText = "SELECT * FROM [Materiales$] WHERE IDFamiliaMaterial = '" &amp; vNodoSeleccionado.Name &amp; "'"<br />
vCmd.Connection = vConn<br />
vDa.SelectCommand = vCmd</p>
<p>If Not vDs.Tables("Materiales") Is Nothing Then<br />
vDs.Tables("Materiales").Reset()<br />
End If</p>
<p>'Llenar el DataSet<br />
vDa.Fill(vDs, "Materiales")</p>
<p>Return True<br />
Else<br />
Return False<br />
End If<br />
Catch ex As Exception<br />
'Aqui va el código que controle la excepción<br />
Finally<br />
vConn.Close()<br />
End Try<br />
End Function</p>
<p>#End Region</p>
<p>#Region "Sección Delegate"</p>
<p>Delegate Function AddNodeMainDelegate(ByVal pNodo As TreeNode) As Boolean</p>
<p>Private Function AddNode(ByVal pNodo As TreeNode) As Boolean<br />
If Me.tvMain.InvokeRequired Then<br />
tvMain.Invoke(New AddNodeMainDelegate(AddressOf AddNode), pNodo)<br />
Else<br />
Dim retVal As Boolean = True<br />
Try<br />
If vCargaMaestro Then<br />
Me.tvMain.Nodes.Add(pNodo)<br />
Else<br />
vNodoSeleccionado.Nodes.Add(pNodo)<br />
End If<br />
Catch ex As Exception</p>
<p>End Try<br />
Return retVal<br />
End If<br />
End Function</p>
<p>#End Region</p>
<p>End Class</p>
<h2>Framework compatibles</h2>
<p>Framework 2.0</p>
<h2>Namespaces</h2>
<p>System.IO<br />
OleDb</p>
<h2>Descargar Proyecto</h2>
<p><strong><span style="text-decoration: underline;"><a href="http://www.lopezatienza.es/Downloads/TreeViewConCargaADemanda.zip">TreeViewConCargaADemanda.zip</a></span></strong></p>
<h2>Referencias de interés</h2>
<p>---</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-carga-de-nodos-en-treeview-a-demanda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server &#8211; Error 233</title>
		<link>http://www.lopezatienza.es/sql-server/sql-server-error-233/</link>
		<comments>http://www.lopezatienza.es/sql-server/sql-server-error-233/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 08:15:28 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=215</guid>
		<description><![CDATA[Comentarios
En este artículo voy a tratar el típico error 233 de SQL Server cuando tratamos de conectarnos a un equipo en remoto.
La solución al  problema que abordo, que se trata de configurar la instancia SQL Server para aceptar conexiones remotas ocurre en un 95% de los casos, por lo que puede ser posible que aplicando [...]]]></description>
			<content:encoded><![CDATA[<h2>Comentarios</h2>
<p>En este artículo voy a tratar el típico error 233 de SQL Server cuando tratamos de conectarnos a un equipo en remoto.</p>
<p>La solución al  problema que abordo, que se trata de configurar la instancia SQL Server para aceptar conexiones remotas ocurre en un 95% de los casos, por lo que puede ser posible que aplicando estos cambios no se resuelva.</p>
<p>Consultar el error siguiente:</p>
<p><strong><em>"El cliente no pudo establecer una conexión debido a un error durante el proceso de inicialización de la conexión previo al inicio de sesión. Entre las causas posibles se incluyen: el cliente intentó conectar con una versión no compatible de SQL Server; el servidor estaba demasiado ocupado apra aceptar nuevas conexiones; o bien, había una limitación de recuersos (memoria insuficiente o número máximo de conexiones permitidas) en el servidor. (provider: Proveedor de canalizaciones con nombre, error: 0 - No hay ningún proceso en el otro extremo de la canalización.) (Microsoft SQL Server, Error: 233)"</em></strong></p>
<p style="text-align: center;"><a href="http://www.lopezatienza.es/Imagenes/SQLServerError233[01].png" target="_blank"><img class="aligncenter" src="http://www.lopezatienza.es/Imagenes/SQLServerError233[01].png" alt="SQLServerError233%5B01%5D.png" width="509" height="200" /></a></p>
<p><span id="more-215"></span></p>
<h2>Solución</h2>
<p>Vamos a Inicio \ Todos los programas \ Microsoft SQL Server 2005 \ Configuration Tools \ SQL Server Surface Area Configuration.</p>
<p style="text-align: center;"><a href="http://www.lopezatienza.es/Imagenes/SQLServerError233[02].png" target="_blank"><img class="aligncenter" src="http://www.lopezatienza.es/Imagenes/SQLServerError233[02].png" alt="SQLServerError233%5B02%5D.png" width="514" height="94" /></a></p>
<p style="text-align: left;">A continuación en la ventana que nos aparece vamos a <strong>Configuración de superficie para servicios y conexiones</strong>.</p>
<p style="text-align: center;"><a href="http://www.lopezatienza.es/Imagenes/SQLServerError233[03].PNG" target="_blank"><img class="aligncenter" src="http://www.lopezatienza.es/Imagenes/SQLServerError233[03].PNG" alt="SQLServerError233%5B03%5D.PNG" width="484" height="391" /></a></p>
<p style="text-align: left;">Navegamos en el árbol de la izquierda a MSSQLSERVER \ Motor de base de datos \ Conexiones remotas</p>
<p style="text-align: left;">Marcamos la opción <strong>Conexiones locales y remotas</strong> y <strong>Usar sólo TCP/IP.</strong></p>
<p style="text-align: center;"><a href="http://www.lopezatienza.es/Imagenes/SQLServerError233%5B04%5D.png" target="_blank"><img class="aligncenter" src="http://www.lopezatienza.es/Imagenes/SQLServerError233%5B04%5D.PNG" alt="SQLServerError233%5B04%5D.png" width="501" height="383" /></a></p>
<p style="text-align: left;">Una vez Aceptemos este cambio, necesitamos reiniciar el servicio de SQL Server (MSSQLSERVER) accediendo en Incio \ Ejecutar \ services.msc</p>
<p style="text-align: center;"><a href="http://www.lopezatienza.es/Imagenes/SQLServerError233%5B05%5D.png" target="_blank"><img class="aligncenter" src="http://www.lopezatienza.es/Imagenes/SQLServerError233%5B05%5D.png" alt="SQLServerError233%5B05%5D.png" width="509" height="200" /></a></p>
<p style="text-align: left;">Ya podremos conectarnos instancias de SQL Server en remoto.</p>
<p style="text-align: left;">Espero os sirva de ayuda.</p>
<p style="text-align: left;">Un saludo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/sql-server/sql-server-error-233/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server &#8211; Desconectar usuarios de una base de datos</title>
		<link>http://www.lopezatienza.es/sql-server/sql-server-desconectar-usuarios-de-una-base-de-datos/</link>
		<comments>http://www.lopezatienza.es/sql-server/sql-server-desconectar-usuarios-de-una-base-de-datos/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 09:05:04 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=221</guid>
		<description><![CDATA[Buenas a todos.
En este artículo os expongo un script de TSQL para desconectar usuarios de una base de datos en específica en SQL Server, sólo deberemos cambiar el valor en negrita:

USE master
DECLARE curkillproc
CURSOR FOR
SELECT spid,dbs.name AS dbname
FROM master..sysprocesses pro, master..sysdatabases dbs
WHERE pro.dbid = dbs.dbid
AND dbs.name = 'NOMBRE_DE_LA_BD'
FOR READ ONLY
DECLARE @varspid AS integer
DECLARE @vardbname AS varchar(256)
DECLARE [...]]]></description>
			<content:encoded><![CDATA[<p>Buenas a todos.</p>
<p>En este artículo os expongo un script de TSQL para desconectar usuarios de una base de datos en específica en SQL Server, sólo deberemos cambiar el valor en negrita:<br />
</br></br><br />
USE master<br />
DECLARE curkillproc<br />
CURSOR FOR<br />
SELECT spid,dbs.name AS dbname<br />
FROM master..sysprocesses pro, master..sysdatabases dbs<br />
WHERE pro.dbid = dbs.dbid<br />
AND dbs.name = '<strong>NOMBRE_DE_LA_BD</strong>'<br />
FOR READ ONLY<br />
DECLARE @varspid AS integer<br />
DECLARE @vardbname AS varchar(256)<br />
DECLARE @numUsers AS integer<br />
SET @numUsers = 0<br />
OPEN curkillproc<br />
FETCH NEXT FROM curkillproc<br />
INTO @varspid, @vardbname<br />
WHILE @@fetch_status = 0<br />
BEGIN<br />
EXEC('kill ' + @varspid)<br />
SET @numUsers = @numUsers + 1<br />
FETCH NEXT FROM curkillproc INTO @varspid, @vardbname<br />
END<br />
CLOSE curkillproc<br />
DEALLOCATE curkillproc<br />
SELECT @numUsers as NumUsersDisconnected<br />
</br></br><br />
Un saludo y espero os sirva de ayuda.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/sql-server/sql-server-desconectar-usuarios-de-una-base-de-datos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NET &#8211; Arrancar la aplicación después de instalar</title>
		<link>http://www.lopezatienza.es/net/net-arrancar-la-aplicacion-despues-de-instalar/</link>
		<comments>http://www.lopezatienza.es/net/net-arrancar-la-aplicacion-despues-de-instalar/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 13:37:20 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[NET]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=171</guid>
		<description><![CDATA[Buenas a todos.
He encontrado este artículo que explica cómo hacer para que cuando se instala nuestra aplicación con un Proyecto de Instalación, se autoarranque al instalarse.
En definitiva lo que hace es heredar de la clase InstallerClass, para sobreescribir el manejador de eventos para el evento Committed.
Está tanto en VB como en C#.

Un artículo excepcional.

http://www.codeproject.com/KB/install/Installation.aspx
Un saludo.
]]></description>
			<content:encoded><![CDATA[<p>Buenas a todos.</p>
<p>He encontrado este artículo que explica cómo hacer para que cuando se instala nuestra aplicación con un Proyecto de Instalación, se autoarranque al instalarse.</p>
<p>En definitiva lo que hace es heredar de la clase InstallerClass, para sobreescribir<span> el manejador de eventos para el evento Committed.</span></p>
<p><span>Está tanto en VB como en C#.<br />
</span></p>
<p><span>Un artículo excepcional.<br />
</span></p>
<p><a href="http://www.codeproject.com/KB/install/Installation.aspx" target="_blank"><span style="text-decoration: underline;">http://www.codeproject.com/KB/install/Installation.aspx</span></a></p>
<p>Un saludo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/net/net-arrancar-la-aplicacion-despues-de-instalar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infragistics &#8211; UltraWinGrid Tips</title>
		<link>http://www.lopezatienza.es/infragistics/infragistics-ultrawingrid-tips/</link>
		<comments>http://www.lopezatienza.es/infragistics/infragistics-ultrawingrid-tips/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 09:47:17 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Infragistics]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=190</guid>
		<description><![CDATA[Hello everybody.
I'm gonna add to this post all that interesting tips that I usually use, and of course, all the new tips I will find on the web.
You should take a look at Knowledge Base about WinGrid:
http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&#38;query=&#38;platform=2&#38;component=2&#38;articletypes=0&#38;age=0&#38;sort=LastModifiedDate&#38;samplesonly=0

As well, you should take a look at the Official Forum, on WinGrid Forum:
http://blogs.infragistics.com/forums/65.aspx
Index:
Tip 1: How to Unselect a [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody.</p>
<p>I'm gonna add to this post all that interesting tips that I usually use, and of course, all the new tips I will find on the web.</p>
<p>You should take a look at Knowledge Base about WinGrid:</p>
<p><a href="http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&amp;query=&amp;platform=2&amp;component=2&amp;articletypes=0&amp;age=0&amp;sort=LastModifiedDate&amp;samplesonly=0" target="_blank">http://devcenter.infragistics.com/Support/KnowledgeBaseResults.aspx?type=Full&amp;query=&amp;platform=2&amp;component=2&amp;articletypes=0&amp;age=0&amp;sort=LastModifiedDate&amp;samplesonly=0</a></p>
<p><span id="more-190"></span></p>
<p>As well, you should take a look at the Official Forum, on WinGrid Forum:</p>
<p><a href="http://blogs.infragistics.com/forums/65.aspx" target="_blank">http://blogs.infragistics.com/forums/65.aspx</a></p>
<p>Index:</p>
<p><span style="text-decoration: underline;"><a href="#Tip1">Tip 1: How to Unselect a Selected Row</a></span><br />
<span style="text-decoration: underline;"><a href="#Tip2">Tip 2: How to Format a Cell with 2 decimals</a></span></p>
<div id="Tip1">Tip 1: How to Unselect a Selected Row</div>
<p>Is your grid implementing multiple row selections?<br />
If you can select only a row in the grid, set the following properties:</p>
<pre class="brush: vb; title: ; notranslate">
CellClickAction = RowSelect
SelectTypeRow = Single
</pre>
<p>Both properties are into the DisplayLayout | Override group.</p>
<p>Now.. If you are using multiple selections....</p>
<p>Each Row that you select is allocated into the MyGrid.Selected.Rows collection. You can use the AfterSelectChange or BeforeSelectChange events to evaluate if the current clicked row is selected already and then de-select it:</p>
<p>Using the Selected property you can select or unselect a row:</p>
<pre class="brush: vb; title: ; notranslate">
grdDetails.ActiveRow.Selected = False
</pre>
<div id="Tip2">Tip 2: How to Format a Cell with a required decimal number</div>
<p>We can assign the Format of a Numeric value column at design time and programmatically.</p>
<p>On design go to the Column Property Format and place the format as the picture below:</p>
<p><a href="http://www.lopezatienza.es/Imagenes/UltraGridTips01.png"><img title="http://www.lopezatienza.es/Imagenes/UltraGridTips01.png" src="http://www.lopezatienza.es/Imagenes/UltraGridTips01.png" alt="http://www.lopezatienza.es/Imagenes/UltraGridTips01.png" width="236" height="33" /></a></p>
<p>Ej: 0.0#.##</p>
<p>Result: 350.7</p>
<p>Ej: 0.00#.##</p>
<p>Result: 350.75</p>
<p>Ej: 0.000#.##</p>
<p>Result: 350.750</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/infragistics/infragistics-ultrawingrid-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software &#8211; Problema Firefox y Marcadores de Google Toolbar</title>
		<link>http://www.lopezatienza.es/software/software-problema-firefox-y-marcadores-de-google-toolbar/</link>
		<comments>http://www.lopezatienza.es/software/software-problema-firefox-y-marcadores-de-google-toolbar/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 19:05:32 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/?p=179</guid>
		<description><![CDATA[Buenas a todos.
Escribo este artículo para aquello que se encuentran con el problema, de que incluso habiendo iniciado sesión en gmail, al pulsar en el botón de Marcadores, sigue pidiendo:
"Accede para ver los marcadores de Google"
El problema viene ocasionado por el sistema de acceso a las cookies. Me huele a que la nueva actualización de [...]]]></description>
			<content:encoded><![CDATA[<p>Buenas a todos.</p>
<p>Escribo este artículo para aquello que se encuentran con el problema, de que incluso habiendo iniciado sesión en gmail, al pulsar en el botón de Marcadores, sigue pidiendo:</p>
<p><strong><em>"Accede para ver los marcadores de Google"</em></strong></p>
<p>El problema viene ocasionado por el sistema de acceso a las cookies. Me huele a que la nueva actualización de la versión 7.1.20110512 no contemplaba un cambio en las urls de las cookies. Este error sólo lo encontraremos aquellos que ya vengamos trabajando con la Toolbar desde hace tiempo.</p>
<p><span id="more-179"></span>Se soluciona de la siguiente manera:</p>
<p>Buscamos en la raíz del disco duro, donde tengamos instalado nuestro sistema operativo, el siguiente archivo:</p>
<p><em><strong>toolbar.js</strong></em></p>
<p>A mi me apareció en la siguiente ruta (Windows 7):</p>
<p><em><strong>C:\Users\lopezatienza\AppData\Roaming\Mozilla\Firefox\Profiles\9keeylzm.default\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\lib</strong></em></p>
<p>Me imagino que los que trabajeis en Windows XP será algo así:</p>
<p><em><strong>C:\Documents and Settings\&lt;nombre de usuario&gt;\Datos de  programa\Mozilla\Firefox\Profiles\&lt;profile id  predeterminado&gt;\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}\lib</strong></em></p>
<p>Las rutas que detallo son orientativas, haced una búsqueda manual.</p>
<p>Recordar configurar el explorador de Windows para ver archivos y carpetas ocultos.</p>
<p>Una vez encontremos el archivo, lo editamos con un editor de texto en condiciones, por ejemplo <span style="text-decoration: underline;"><a href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a></span>.</p>
<p>Debemos buscar y reemplazar el siguiente texto en el archivo:</p>
<p><strong><em>http://www.google.com/accounts</em></strong></p>
<p>Por este otro:</p>
<p><strong><em>accounts.google.com</em></strong></p>
<p>Finalmente guardamos el archivo y reiniciamos Firefox.</p>
<p>Eso es todo, espero os sirva de ayuda.</p>
<p>Un saludo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/software/software-problema-firefox-y-marcadores-de-google-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Basic .NET &#8211; Conectar desde Visual Studio 2005 a SQL Server 2008</title>
		<link>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-conectar-desde-visual-studio-2005-a-sql-server-2008/</link>
		<comments>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-conectar-desde-visual-studio-2005-a-sql-server-2008/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 19:53:27 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Visual Basic .NET]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/visual-basic-net/visual-basic-net-conectar-desde-visual-studio-2005-a-sql-server-2008/</guid>
		<description><![CDATA[Buenas a todos.
El problema proviene al tratar de conectar a una Base de Datos de SQL Server 2008 desde Visual Studio 2005, mostrando el emergente:
"Esta versión del servidor no es compatible. Debe tener instalado Microsoft SQL Server 2005 Beta 2 o posterior"

 

El problema según Microsoft es el siguiente:
Esta actualización resuelve el siguiente error que [...]]]></description>
			<content:encoded><![CDATA[<p>Buenas a todos.</p>
<p>El problema proviene al tratar de conectar a una Base de Datos de SQL Server 2008 desde Visual Studio 2005, mostrando el emergente:</p>
<p><strong>"<em>Esta versión del servidor no es compatible. Debe tener instalado Microsoft SQL Server 2005 Beta 2 o posterior</em></strong>"<br />
<span id="more-175"></span></p>
<p style="text-align: center"> <img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005[01].png" /></p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005%5B02%5D.png" /></p>
<p>El problema según Microsoft es el siguiente:</p>
<p><em>Esta actualización resuelve el siguiente error que aparece cuando  intenta utilizar las herramientas de diseño de Microsoft Visual Studio  2005 Service Pack 1 para abrir una conexión de base de datos con  Microsoft SQL Server 2008:</em></p>
<p><em>“No se admite esta versión del servidor. Sólo se admiten servidores hasta la versión Microsoft SQL Server 2005.”</em></p>
<p><em> </em><em>Esta actualización trata este problema y habilita la siguiente funcionalidad de Visual Studio para SQL Server 2008:<br />
</em></p>
<ul>
<li><em>El  explorador de servidores se conecta correctamente a SQL Server 2008 y  los objetos de base de datos, como procedimientos almacenados y datos de  tabla, se pueden ver y editar. Tenga en cuenta que los esquemas de  tabla no se pueden ver ni editar en esta versión.</em></li>
<li><em>Los proyectos SQL CLR diseñados para SQL Server 2008 se pueden crear e implementar en el servidor. </em></li>
<li><em>Las depuraciones T-SQL y SQL CLR están habilitadas para SQL Server 2008.</em></li>
<li><em>Las características de enlace de datos en proyectos de cliente y web están habilitadas. </em></li>
</ul>
<p><em><br />
Esta actualización no admite las siguientes características para SQL Server 2008:<br />
</em></p>
<ul>
<li><em>Creación  y edición de esquemas de tabla en el diseñador de tablas o en los  diagramas de base de datos. Como solución alternativa puede utilizar la  característica del diseñador de tablas de SQL Server Management Studio  2008 para editar esquemas de tabla en SQL Server 2008. </em></li>
</ul>
<p>El link de descarga es el siguiente:</p>
<p><a href="http://www.microsoft.com/downloads/es-es/details.aspx?FamilyId=e1109aef-1aa2-408d-aa0f-9df094f993bf&amp;displaylang=es" target="_blank">http://www.microsoft.com/downloads/es-es/details.aspx?FamilyId=e1109aef-1aa2-408d-aa0f-9df094f993bf&amp;displaylang=es</a><br />
</br></br><br />
Hay otra opción, y es la de trabajar mediante el proveedor SQLOLEDB nativo a través del proveedor de datos de .NET Framework para OLE DB.</p>
<p>Para ello hacemos los siguientes pasos.</p>
<p>1) En la ventana de Agregar conexión pulsamos en Cambiar...</p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005%5B03%5D.png" /></p>
<p align="left">2) En la ventana Cambiar origen de datos, cambiamos el Proveedor de datos a "Proveedor de datos de .NET Framework para OLE DB"</p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005%5B04%5D.png" height="244" width="470" /></p>
<p align="left">3) Comprobamos que se ha cambiado el Origen de datos y pulsamos en Comprobar conexión y a continuación en Aceptar.</p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005%5B05%5D.png" /></p>
<p align="left">4) Si todo ha ido correctamente nos aparecerá en Explorador de servidores la nueva conexión de datos.</p>
<p style="text-align: center"><img src="http://www.lopezatienza.es/Imagenes/VSS_SQLS2005%5B06%5D.png" /></p>
<p align="left">Un saludo y espero os sirva de ayuda.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/visual-basic-net/visual-basic-net-conectar-desde-visual-studio-2005-a-sql-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seguridad &#8211; How to setup an IPSec VPN Tunnel Cisco 2320 Vs RVS4000</title>
		<link>http://www.lopezatienza.es/seguridad/seguridad-how-to-setup-an-ipsec-vpn-tunnel-cisco-2320-vs-rvs4000/</link>
		<comments>http://www.lopezatienza.es/seguridad/seguridad-how-to-setup-an-ipsec-vpn-tunnel-cisco-2320-vs-rvs4000/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 19:00:50 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[Seguridad]]></category>
		<category><![CDATA[Redes]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/seguridad/seguridad-how-to-setup-an-ipsec-vpn-tunnel-cisco-2320-vs-rvs4000/</guid>
		<description><![CDATA[I have succesfully config an IPSec VPN Tunnel by using a Router  Scientific Atlanta Cisco 2320 and a RVS4000 4-Port Gigabit Security  Router with  VPN.
On the site of Router Scientific Atlanta Cisco 2320 this is some info:

WAN IP: A.A.A.A
Router Local IP: 192.168.5.1
Subnet: 192.168.5.X
Subnet Mask: 255.255.255.0

On the site of RVS4000 4-Port Gigabit Security Router [...]]]></description>
			<content:encoded><![CDATA[<p>I have succesfully config an IPSec VPN Tunnel by using a Router  Scientific Atlanta Cisco 2320 and a RVS4000 4-Port Gigabit Security  Router with  VPN.</p>
<p>On the site of Router Scientific Atlanta Cisco 2320 this is some info:</p>
<ul>
<li>WAN IP: A.A.A.A</li>
<li>Router Local IP: 192.168.5.1</li>
<li>Subnet: 192.168.5.X</li>
<li>Subnet Mask: 255.255.255.0</li>
</ul>
<p>On the site of RVS4000 4-Port Gigabit Security Router with  VPN this is some info:</p>
<ul>
<li>WAN IP: B.B.B.B</li>
<li>Router Local IP: 192.168.0.10</li>
<li>Subnet: 192.168.0.X</li>
<li>Subnet Mask: 255.255.255.0</li>
</ul>
<p><span id="more-174"></span> <strong>Remember  that you can not be on the same range of IP, I mean, you can not have  192.168.0.X if the remote network is on 192.168.0.X, you have to change  some of the Routers.</strong></p>
<p>I show the configuration on Router Scientific Atlanta Cisco 2320:</p>
<p><a href="http://www.lopezatienza.es/Imagenes/Cisco2320VPN[01].png" target="_blank"></a></p>
<p style="text-align: center"><a href="http://www.lopezatienza.es/Imagenes/Cisco2320VPN[01].png" target="_blank"><img src="http://www.lopezatienza.es/Imagenes/Cisco2320VPN[01].png" alt="Cisco2320VPN[01].png" height="761" width="513" /></a></p>
<p>I show the configuration on RVS4000 4-Port Gigabit Security Router with  VPN:</p>
<p><a href="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[01].png" target="_blank"></a></p>
<p style="text-align: center"><a href="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[01].png" target="_blank"><img src="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[01].png" alt="Cisco2320VPN[01].png" height="798" width="514" /></a></p>
<p>If all is correctly configured, you should see on Router Scientific Atlanta Cisco 2320 the Status Connected:</p>
<p><a href="http://www.lopezatienza.es/Imagenes/Cisco2320VPN%5B02%5D.png" target="_blank"></a></p>
<p style="text-align: center"><a href="http://www.lopezatienza.es/Imagenes/Cisco2320VPN%5B02%5D.png" target="_blank"><img src="http://www.lopezatienza.es/Imagenes/Cisco2320VPN%5B02%5D.png" alt="Cisco2320VPN[01].png" height="308" width="507" /></a></p>
<p>?If all is correctly configured, you should see on RVS4000 4-Port Gigabit Security Router with  VPN the Status Up:<a href="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[02].png" target="_blank"></a></p>
<p style="text-align: center"><a href="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[02].png" target="_blank"><img src="http://www.lopezatienza.es/Imagenes/CiscoRVS4000VPN[02].png" alt="Cisco2320VPN[01].png" height="225" width="516" /></a></p>
<p>As  you can see, I'm connected to the remote Router (RVS4000 4-Port Gigabit  Security Router with  VPN) by my own web browser accesing by the local  IP 192.168.0.10</p>
<p>I have used Authentication MD5, maybe is not the best one but I had no time to test SHA1, I will when I will have time.</p>
<p>I have recently add this info to the Official Cisco Forum:</p>
<p><u><a href="https://supportforums.cisco.com/message/3414237" target="_blank">https://supportforums.cisco.com/message/3414237</a></u></p>
<p>I wish that this help to anyone that need to do this.</p>
<p>Best regards.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/seguridad/seguridad-how-to-setup-an-ipsec-vpn-tunnel-cisco-2320-vs-rvs4000/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL Server &#8211; Update Select de una tabla con un cruce</title>
		<link>http://www.lopezatienza.es/sql-server/sql-server-update-select-de-una-tabla-con-un-cruce/</link>
		<comments>http://www.lopezatienza.es/sql-server/sql-server-update-select-de-una-tabla-con-un-cruce/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 20:34:39 +0000</pubDate>
		<dc:creator>lopezatienza</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.lopezatienza.es/sql-server/sql-server-update-select-de-una-tabla-con-un-cruce/</guid>
		<description><![CDATA[Buenas.
Con esta consulta actualizas una tabla cruzándola con la que comparas, muy útil y aunque no es complejo puede llegar a dar dolor de cabeza buscando la solución.




Tabla01


ID_Tabla01
Descripcion
CampoACambiar


1
Prueba1
Dato1


2
Prueba2
Dato2


3
Prueba3
Dato3






Tabla02


ID_Tabla02
Descripcion
CampoACambiar


1
Prueba11
Dato1


2
Prueba12
Dato2


3
Prueba13
Dato3






Resultado Tabla02 después del Update


ID_Tabla02
Descripcion
CampoACambiar


1
Prueba1
Dato1


2
Prueba2
Dato2


3
Prueba3
Dato3



UPDATE
 Tabla02
 SET
 Tabla02.Descripcion = Tabla01.Descripcion
 FROM
 Tabla02
 INNER JOIN
 Tabla01
 ON
 Tabla02.ID_Tabla02 = Tabla01.ID_Tabla01
 WHERE
 Tabla02.ID_Tabla02 = Tabla01.ID_Tabla01
Un saludo y espero os sirva [...]]]></description>
			<content:encoded><![CDATA[<p>Buenas.</p>
<p>Con esta consulta actualizas una tabla cruzándola con la que comparas, muy útil y aunque no es complejo puede llegar a dar dolor de cabeza buscando la solución.</p>
<p><span id="more-176"></span></p>
<table border="1" width="100%">
<tbody>
<tr>
<td colspan="3" align="center">Tabla01</td>
</tr>
<tr>
<td>ID_Tabla01</td>
<td>Descripcion</td>
<td>CampoACambiar</td>
</tr>
<tr>
<td>1</td>
<td>Prueba1</td>
<td>Dato1</td>
</tr>
<tr>
<td>2</td>
<td>Prueba2</td>
<td>Dato2</td>
</tr>
<tr>
<td>3</td>
<td>Prueba3</td>
<td>Dato3</td>
</tr>
</tbody>
</table>
<table border="1" width="100%">
<tbody>
<tr>
<td colspan="3" align="center">Tabla02</td>
</tr>
<tr>
<td>ID_Tabla02</td>
<td>Descripcion</td>
<td>CampoACambiar</td>
</tr>
<tr>
<td>1</td>
<td>Prueba11</td>
<td>Dato1</td>
</tr>
<tr>
<td>2</td>
<td>Prueba12</td>
<td>Dato2</td>
</tr>
<tr>
<td>3</td>
<td>Prueba13</td>
<td>Dato3</td>
</tr>
</tbody>
</table>
<table border="1" width="100%">
<tbody>
<tr>
<td colspan="3" align="center">Resultado Tabla02 después del Update</td>
</tr>
<tr>
<td>ID_Tabla02</td>
<td>Descripcion</td>
<td>CampoACambiar</td>
</tr>
<tr>
<td>1</td>
<td>Prueba1</td>
<td>Dato1</td>
</tr>
<tr>
<td>2</td>
<td>Prueba2</td>
<td>Dato2</td>
</tr>
<tr>
<td>3</td>
<td>Prueba3</td>
<td>Dato3</td>
</tr>
</tbody>
</table>
<p><em>UPDATE</em></p>
<p><em> </em><em>Tabla02</em></p>
<p><em> </em><em>SET</em></p>
<p><em> </em><em>Tabla02.Descripcion = Tabla01.Descripcion</em></p>
<p><em> </em><em>FROM</em></p>
<p><em> </em><em>Tabla02</em></p>
<p><em> </em><em>INNER JOIN</em></p>
<p><em> </em><em>Tabla01</em></p>
<p><em> </em><em>ON</em></p>
<p><em> </em><em>Tabla02.ID_Tabla02 = Tabla01.ID_Tabla01</em></p>
<p><em> </em><em>WHERE</em></p>
<p><em> </em><em>Tabla02.ID_Tabla02 = Tabla01.ID_Tabla01</em></p>
<p>Un saludo y espero os sirva de ayuda.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lopezatienza.es/sql-server/sql-server-update-select-de-una-tabla-con-un-cruce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

