<?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>THE .NET WAY &#187; SQLServer &#8211;  &#8211; The .Net Way</title>
	<atom:link href="http://www.thedotnetway.net/tag/sqlserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedotnetway.net</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 14:05:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>De relacional a NOSQL</title>
		<link>http://www.thedotnetway.net/2010/11/08/de-relacional-a-nosql/</link>
		<comments>http://www.thedotnetway.net/2010/11/08/de-relacional-a-nosql/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 16:31:05 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/11/08/de-relacional-a-nosql/</guid>
		<description><![CDATA[Una de nuestras aplicaciones es un CRS con mucha necesidad de performance, usamos una base de datos relacional para persistencia de datos, pero todos los procesos están tirando de un sistema de Cache (key=&#62;value), así las operaciones de escritura (INSERT,DELETE,UPDATE) están actualizando dos sitios, la BD Relacional y el Cache, y las operaciones de lectura<a class="rmore" href="http://www.thedotnetway.net/2010/11/08/de-relacional-a-nosql/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/11/Picture-101.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Picture-101" border="0" alt="Picture-101" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/11/Picture-101_thumb.png" width="167" height="92" /></a>Una de nuestras aplicaciones es un <a href="http://en.wikipedia.org/wiki/Hotel_reservation_systems" target="_blank">CRS</a> con mucha necesidad de performance, usamos una <a href="http://es.wikipedia.org/wiki/Base_de_datos_relacional" target="_blank">base de datos relacional</a> para persistencia de datos, pero todos los procesos están tirando de un sistema de <a href="http://es.wikipedia.org/wiki/Cache" target="_blank">Cache</a> (key=&gt;value), así las operaciones de escritura (INSERT,DELETE,UPDATE) están actualizando dos sitios, la BD Relacional y el Cache, y las operaciones de lectura tiran del Cache. Además tenemos un servicio de control para llenar el Cache en caso de parada, ósea que simulamos la persistencia del Cache y usamos la base de datos relacional como respaldo.</p>
<p>Hace tiempo ya que me ronda por la cabeza la pregunta, <em>Para que necesito la BD Relacional en este escenario?</em> en realidad estamos escribiendo mas código para mantener la persistencia de los objetos en la BD relacional,tenemos que modificar las tablas para modificar los objetos y además esta todo el tema de la administración de la relacional, índices, diseño etc. por no hablar del precio de las licencias.</p>
<p><em>No seria todo mas fácil con una base de datos de objetos?</em></p>
<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/11/Slide-Gallery-MongoDB1.jpg" target="_blank"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="Slide-Gallery-MongoDB" border="0" alt="Slide-Gallery-MongoDB" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/11/Slide-Gallery-MongoDB_thumb1.jpg" width="89" height="67" /></a>Ya hemos empezado a hacer <a href="http://www.thedotnetway.net/2010/10/21/mongodb-como-cache-para-aplicaciones-net/" target="_blank">algunas pruebas</a> con <a href="http://en.wikipedia.org/wiki/MongoDB" target="_blank">MongoDB</a> como base de datos, aunque solo guardando objetos tipo key=&gt;value como substituto del sistema de Cache.</p>
<p>En el Grafico, que es del sitio de MongoDB, se puede ver que el performance no llega al nivel de un sistema de Cache, pero se le aproxima bastante y desde luego seria un buen primer paso para probar la viabilidad de este cambio ya que prácticamente no tendríamos que cambiar código de la aplicación en una primera fase en la que convivirían relacional y NOSQL.</p>
<p>Bueno, es lo que me ronda la cabeza, así que cualquier comentario o experiencia que tengáis será bienvenido. <img src='http://www.thedotnetway.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/11/08/de-relacional-a-nosql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Traspasar Base de Datos SQL 2008 a SQL 2005</title>
		<link>http://www.thedotnetway.net/2010/10/07/traspasar-base-de-datos-sql-2008-a-sql-2005/</link>
		<comments>http://www.thedotnetway.net/2010/10/07/traspasar-base-de-datos-sql-2008-a-sql-2005/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 08:02:07 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Trucos]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/10/07/traspasar-base-de-datos-sql-2008-a-sql-2005/</guid>
		<description><![CDATA[Si habéis llegado a este POST es porque, como yo, os habéis dado cuenta que un Backup de una base de datos SQLServer 2008 no se puede restaurar de ninguna manera en un SQLServer 2005. Cual es la solución? según he leído en varios sitios de internet es usando la opción “Tareas/Generar Script” con la<a class="rmore" href="http://www.thedotnetway.net/2010/10/07/traspasar-base-de-datos-sql-2008-a-sql-2005/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Si habéis llegado a este POST es porque, como yo, os habéis dado cuenta que un Backup de una base de datos SQLServer 2008 no se puede restaurar de ninguna manera en un SQLServer 2005.</font></p>
<p>Cual es la solución? según he leído en varios sitios de internet es usando la opción “Tareas/Generar Script” con la opción “Incluir datos en el Script” esa opción puede valer, pero siempre y cuando tu Base de Datos no este muy elaborada ya que por poca </font><a href="http://es.wikipedia.org/wiki/Integridad_referencial" target="_blank">integridad referencial</a> que tenga esa opción ya no vale porque recibirás errores de integridad referencial en los inserts.</p>
<p>Puedes solucionar el problema siguiendo estos pasos: </p>
<ul>
<li>Crear las base de datos con la opción “Tareas/Generar Script”, pero sin llevarte los datos. </li>
<li>Desactivas toda la integridad referencial de la base de datos, con el script que pongo abajo </li>
<li>Traspasas los datos con la opción “Tareas/Importar o Exportar” Datos. </li>
<li>Vuelves a activar la integración referencial con el script </li>
</ul>
<p>Aquí dejo el Script, para activar otra vez cambias el nocheck del printf por check, ojo este script no te cambia nada en la Base de Datos, te genera el script que luego ejecutaras para activar desactivar la integridad referencial</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"><span style="color: #0000ff">DECLARE</span> @Tabla <span style="color: #0000ff">as</span> <span style="color: #0000ff">varchar</span>(255)

<span style="color: #0000ff">DECLARE</span> @<span style="color: #0000ff">Constraint</span>  <span style="color: #0000ff">as</span> <span style="color: #0000ff">varchar</span>(255)

<span style="color: #0000ff">DECLARE</span> CursorConstraint <span style="color: #0000ff">CURSOR</span> FAST_FORWARD

<span style="color: #0000ff">FOR</span>

<span style="color: #0000ff">select</span> table_name,

constraint_name

<span style="color: #0000ff">from</span>

INFORMATION_SCHEMA.TABLE_CONSTRAINTS

<span style="color: #0000ff">where</span>

constraint_type=<span style="color: #006080">'FOREIGN KEY'</span>

<span style="color: #0000ff">OPEN</span> CursorConstraint

<span style="color: #0000ff">FETCH</span> <span style="color: #0000ff">NEXT</span> <span style="color: #0000ff">FROM</span> CursorConstraint <span style="color: #0000ff">INTO</span>

@Tabla, @<span style="color: #0000ff">Constraint</span>

<span style="color: #0000ff">WHILE</span> <span style="color: #cc6633">@@FETCH_STATUS</span> = 0

<span style="color: #0000ff">BEGIN</span>

<span style="color: #0000ff">Print</span> <span style="color: #006080">'alter table '</span> + @tabla + <span style="color: #006080">' nocheck constraint '</span> + @<span style="color: #0000ff">Constraint</span>

<span style="color: #0000ff">FETCH</span> <span style="color: #0000ff">NEXT</span> <span style="color: #0000ff">FROM</span> CursorConstraint <span style="color: #0000ff">INTO</span>

@Tabla, @<span style="color: #0000ff">Constraint</span>

<span style="color: #0000ff">END</span>

<span style="color: #0000ff">CLOSE</span> CursorConstraint</pre>
<p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/10/07/traspasar-base-de-datos-sql-2008-a-sql-2005/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Persistencia de Objetos con XPO</title>
		<link>http://www.thedotnetway.net/2010/07/29/persistencia-de-objetos-con-xpo/</link>
		<comments>http://www.thedotnetway.net/2010/07/29/persistencia-de-objetos-con-xpo/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 08:18:22 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[RAD]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/07/29/persistencia-de-objetos-con-xpo/</guid>
		<description><![CDATA[Estos días estoy probando varias soluciones de persistencia de Objetos ya que estoy pensando seriamente dejar de usar Deklarit porque van muy lentos con las versiones. El primero que he probado ha sido XPO de DevExpress, es bastante potente y fácil de usar aunque el generador de clases desde una BD existente es un poco<a class="rmore" href="http://www.thedotnetway.net/2010/07/29/persistencia-de-objetos-con-xpo/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p><img style="margin: 0px 5px 0px 0px; display: inline;" src="http://boxcabi.files.wordpress.com/2010/01/devexpress.jpg" alt="" width="164" height="82" align="left" />Estos días estoy probando varias soluciones de persistencia de Objetos ya que estoy pensando seriamente dejar de usar <a href="http://www.deklarit.com" target="_blank">Deklarit</a> porque van muy lentos con las versiones.</p>
<p>El primero que he probado ha sido <a href="http://www.devexpress.com/Products/NET/ORM/" target="_blank">XPO</a> de <a href="http://www.devexpress.com/" target="_blank">DevExpress</a>, es bastante potente y fácil de usar aunque el generador de clases desde una BD existente es un poco pobre, no te genera las relaciones ni las tablas cuya PK este compuesta por varios campos, eso tendremos que solucionarlo a mano, aquí podéis ver como.</p>
<p>El tema de PK por múltiples campos se soluciona creando una estructura donde definimos la clave primaria y luego en la clase que mapeamos a la tabla definimos esa estructura como PK</p>
<div id="codeSnippetWrapper">
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">struct</span> MyTablePK</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">{</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    [Persistent(<span style="color: #006080;">"Field1"</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> FieldKey1;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    [Persistent(<span style="color: #006080;">"Field2"</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> FiledKey2;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">}</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[OptimisticLocking(<span style="color: #0000ff;">false</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[Persistent(<span style="color: #006080;">"Table"</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> MyTable : XPBaseObject</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">{</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    [Key(), Persistent()]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyTablePK PK;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field3;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field4;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyTable(Session session) : <span style="color: #0000ff;">base</span>(session) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyTable() : <span style="color: #0000ff;">base</span>(Session.DefaultSession) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">override</span> <span style="color: #0000ff;">void</span> AfterConstruction() { <span style="color: #0000ff;">base</span>.AfterConstruction(); }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">}</pre>
<p><!--CRLF--></p>
</div>
</div>
</div>
<p>El tema de la relaciones se soluciona utilizando el atributo [Association] en la propiedad donde definimos la colección de objetos hijos indicándole el nombre que le hemos dado en el SQL al FK</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[OptimisticLocking(<span style="color: #0000ff;">false</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[Persistent(<span style="color: #006080;">"Table"</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> MyTable : XPBaseObject</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">{</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    [Key(<span style="color: #0000ff;">true</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">int</span> PK;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field1;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field2;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    [Association(<span style="color: #006080;">"Table-ChildTable"</span>, <span style="color: #0000ff;">typeof</span>(MyChildTable)), Aggregated]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> XPCollection Childs</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    {</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        get { <span style="color: #0000ff;">return</span> GetCollection(<span style="color: #006080;">"MyChildTable"</span>); }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyTable(Session session) : <span style="color: #0000ff;">base</span>(session) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyTable() : <span style="color: #0000ff;">base</span>(Session.DefaultSession) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">override</span> <span style="color: #0000ff;">void</span> AfterConstruction() { <span style="color: #0000ff;">base</span>.AfterConstruction(); }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">}</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[OptimisticLocking(<span style="color: #0000ff;">false</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[Persistent(<span style="color: #006080;">"ChilTable"</span>)]</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> MyChildTable : XPBaseObject</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">{</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">int</span> FK;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">int</span> PK;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field1;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">string</span> Field2;</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyChildTable(Session session) : <span style="color: #0000ff;">base</span>(session) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> MyChildTable() : <span style="color: #0000ff;">base</span>(Session.DefaultSession) { }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">override</span> <span style="color: #0000ff;">void</span> AfterConstruction() { <span style="color: #0000ff;">base</span>.AfterConstruction(); }</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">}</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>Pues nada, sigo probando cosas, ya iré comentando <img src='http://www.thedotnetway.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/07/29/persistencia-de-objetos-con-xpo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP y Windows</title>
		<link>http://www.thedotnetway.net/2009/05/13/php-y-windows/</link>
		<comments>http://www.thedotnetway.net/2009/05/13/php-y-windows/#comments</comments>
		<pubDate>Wed, 13 May 2009 10:26:59 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2009/05/13/php-y-windows/</guid>
		<description><![CDATA[No por programar en PHP tienes que estar casado con Linux pero la verdad es que eso es lo que suele pasar, nosotros mismos hemos tenido proyectos con la parte servidora corriendo en Windows, SQLServer e IIS y el UI en PHP en Linux obligando al cliente a mantener dos tipos de servidores con los<a class="rmore" href="http://www.thedotnetway.net/2009/05/13/php-y-windows/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thedotnetway.net/wp-content/uploads/2009/05/php-lab.png"><img title="php_lab" style="border-top-width: 0px; display: inline; border-left-width: 1px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="95" alt="php_lab" src="http://www.thedotnetway.net/wp-content/uploads/2009/05/php-lab-thumb.png" width="95" align="left" border="0" /></a> </p>
<p>No por programar en <a href="http://es.wikipedia.org/wiki/.php" target="_blank">PHP</a> tienes que estar casado con Linux pero la verdad es que eso es lo que suele pasar, nosotros mismos hemos tenido proyectos con la parte servidora corriendo en Windows, SQLServer e IIS y el UI en PHP en Linux obligando al cliente a mantener dos tipos de servidores con los problemas y gastos que puede generar eso.</p>
<p>El otro día ya estuve escribiendo sobre las ventajas del PHP, rápido y sencillo (por no hablar de la cantidad de programadores que puedes encontrar), por lo que no es descabellado plantear un proyecto con el UI en web en PHP mientras toda la parte servidora la tienes en .NET, con SQLServer como base de datos e IIS como servidor de aplicaciones.</p>
<p>La gente de Microsoft ha preparado un KIT de entrenamiento para los programadores de PHP, en este KIT tienes ejemplos y documentación para usar IIS y SQLServer desde PHP, lo puedes <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=c8498c9b-a85a-4afa-90c0-593d0e4850cb" target="_blank">descargar desde aquí</a> y encontraras:</p>
<p>PHP &amp; SQL Server Demos.    <br />Integrating SQL Server Geo-Spatial with PHP.     <br />SQL Server Reporting Services and PHP.     <br />PHP &amp; SQL Server Hands On Labs.     <br />Introduction to Using SQL Server with PHP.     <br />Using Full Text Search over Office Documents in PHP.     <br />PHP on Windows Hands On Labs.     <br />IIS Access Control Features for PHP.     <br />Using IIS 7.0 Media Features in a PHP Application.     <br />Troubleshooting PHP.     <br />Migrating PHP Applications to IIS 7.0. </p>
<p>A disfrutarlo <img src='http://www.thedotnetway.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />     </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2009/05/13/php-y-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LINQ to SQL, orderby y Take</title>
		<link>http://www.thedotnetway.net/2009/05/12/linq-to-sql-orderby-y-take/</link>
		<comments>http://www.thedotnetway.net/2009/05/12/linq-to-sql-orderby-y-take/#comments</comments>
		<pubDate>Tue, 12 May 2009 08:17:40 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Trucos]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2009/05/12/linq-to-sql-orderby-y-take/</guid>
		<description><![CDATA[Con LINQ 2 SQL y usando Take, es realmente sencillo obtener los últimos o los primeros registros de una Tabla, simplemente tenemos que ordenarla como nos interese con el order by y usar el método Take para indicar cuantos registros queremos. Aquí dejo un ejemplo para coger los últimos registros de una tabla. public List&#60;object&#62;<a class="rmore" href="http://www.thedotnetway.net/2009/05/12/linq-to-sql-orderby-y-take/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Con <a href="http://es.wikipedia.org/wiki/Language_Integrated_Query" target="_blank">LINQ 2 SQL</a> y usando <a href="http://msdn.microsoft.com/es-es/library/bb503062(VS.95).aspx" target="_blank">Take</a>, es realmente sencillo obtener los últimos o los primeros registros de una Tabla, simplemente tenemos que ordenarla como nos interese con el <a href="http://msdn.microsoft.com/es-es/library/bb534966(VS.95).aspx" target="_blank">order by</a> y usar el método Take para indicar cuantos registros queremos.</p>
<p>Aquí dejo un ejemplo para coger los últimos registros de una tabla.</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ddad6b19-9951-4864-b69d-9b997d401d63" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #000000;">   </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> List</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">object</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> GetLastRecords(</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> NoOfRecords)
        {
            var records </span><span style="color: #000000;">=</span><span style="color: #000000;">
                (from r </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> DataClassesDataContext.Table
                 orderby r.Pk descending select r).Take(NoOfRecords);

            List</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">object</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> Result </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> List</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">object</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">();

            </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (Record record </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> records)
            {
                Result.Add(records);
            }

            </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> Result;
        }</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2009/05/12/linq-to-sql-orderby-y-take/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLServer 2008 Disponible</title>
		<link>http://www.thedotnetway.net/2008/09/24/sqlserver-2008-disponible/</link>
		<comments>http://www.thedotnetway.net/2008/09/24/sqlserver-2008-disponible/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 13:43:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/09/24/sqlserver-2008-disponible/</guid>
		<description><![CDATA[Me acaba de llegar el mail desde MS, SQL Server 2008 ya esta disponible El pasado 6 de Agostoanunciaban la RTM (Release to Manufacturing) de Microsoft SQL Server 2008. ¡Y ya está disponible para que tus clientes puedan sacarle todo el partido! Es una plataforma de datos fiable, productiva e inteligente con la cual ya<a class="rmore" href="http://www.thedotnetway.net/2008/09/24/sqlserver-2008-disponible/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[</p>
<p>Me acaba de llegar el mail desde MS, SQL Server 2008 ya esta disponible <img src='http://www.thedotnetway.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img src="http://www.thedotnetway.net/content/binary/SQLServer2008.jpg" border="0" /></p>
<p>El pasado 6 de Agostoanunciaban la RTM (Release to Manufacturing) de Microsoft SQL Server 2008. ¡Y ya está disponible para que tus clientes puedan sacarle todo el partido!   <br />Es una plataforma de datos fiable, productiva e inteligente con la cual ya pueden gestionar las aplicaciones de misión crítica más exigentes, reducir el tiempo y el coste tanto de desarrollo como de administración y facilitar la información necesaria de forma más ágil para la toma de decisiones.</p>
<p>Ahora con SQL Server 2008 podrán gestionar cualquier tipo de dato, en cualquier sitio y en cualquier momento: datos espaciales, imágenes, música y archivos gestionados de forma coherente, integrada y segura.</p>
<p>Ediciones de SQL Server 2008:    <br />Además de las ya existentes con SQL Server 2005 (Enterprise, Standard, Workgroup, Developer, Express y Compact), con el lanzamiento de SQL Server 2008 se introduce una nueva edición:&#160; SQL Server 2008 Web Edition, específicamente diseñada para entornos web de alta disponibilidad que se ejecutan sobre Windows Server. Ideal para disponer de aplicaciones web con costes reducidos y ofrecer soluciones de hosting para los clientes.</p>
<p>Para más información: <a href="http://www.microsoft.com/sqlserver/2008/en/us/editions.aspx">http://www.microsoft.com/sqlserver/2008/en/us/editions.aspx</a> </p>
</p>
<p> <span style="font-size:12pt;line-height:115%;font-family:&#39;"><font color="#000000"></font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2008/09/24/sqlserver-2008-disponible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profiling SQL CLR procedures con AQTime</title>
		<link>http://www.thedotnetway.net/2008/06/11/profiling-sql-clr-procedures-con-aqtime/</link>
		<comments>http://www.thedotnetway.net/2008/06/11/profiling-sql-clr-procedures-con-aqtime/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 11:56:00 +0000</pubDate>
		<dc:creator>jordicb</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2008/06/11/profiling-sql-clr-procedures-con-aqtime/</guid>
		<description><![CDATA[Intentando mejorar el rendimiento de unos procedimientos almacenados CLR que utilizamos en un proyecto hemos dado con esta herramienta que nos ha facilitado mucho las cosas. Podéis descargaros una versión de prueba desde aquí. Y aquí tenéis los pasos necesarios para poder analizar procedimientos almacenados CLR.]]></description>
			<content:encoded><![CDATA[<p>Intentando mejorar el rendimiento de unos procedimientos almacenados CLR que utilizamos en un proyecto hemos dado con esta herramienta que nos ha facilitado mucho las cosas. Podéis descargaros una versión de prueba desde <a href="http://automatedqa.com/downloads/aqtime/index.asp" target="_blank">aquí</a>.</p>
<p><font color="#800080"><a href="http://automatedqa.com/products/aqtime/"><img alt="Aqtimebanner" src="http://www.thedotnetway.net/content/binary/aqtimebanner.gif" border="0" /></a></font></p>
<p>Y <a href="http://automatedqa.com/products/aqtime/index.asp" target="_blank">aquí</a> tenéis los pasos necesarios para poder analizar procedimientos almacenados CLR.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2008/06/11/profiling-sql-clr-procedures-con-aqtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>M&#233;todos An&#243;nimos y SQLCLR</title>
		<link>http://www.thedotnetway.net/2007/11/20/metodos-anonimos-y-sqlclr/</link>
		<comments>http://www.thedotnetway.net/2007/11/20/metodos-anonimos-y-sqlclr/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 15:36:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2007/11/20/metodos-anonimos-y-sqlclr/</guid>
		<description><![CDATA[Estaba escribiendo unos procedimientos almacenados SQLCLR, usaba algunos delegados para filtrar Listas y al intentar implementar la dll en el Servidor SQL obtenía, aunque el compilador no se quejaba de nada al generar, este error: Error 2 Error de CREATE ASSEMBLY porque el tipo &#8216;StoredProcedures&#8217; del ensamblado safe &#8216;NameSpace.MyClase&#8217; tiene un campo estático &#8216;&#60;&#62;9__CachedAnonymousMethodDelegate1&#8242;. Los<a class="rmore" href="http://www.thedotnetway.net/2007/11/20/metodos-anonimos-y-sqlclr/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Estaba escribiendo unos procedimientos almacenados SQLCLR, usaba algunos delegados para filtrar Listas y al intentar implementar la dll en el Servidor SQL obtenía, aunque el compilador no se quejaba de nada al generar, este error:</p>
<p><em>Error 2 Error de CREATE ASSEMBLY porque el tipo &#8216;StoredProcedures&#8217; del ensamblado safe &#8216;NameSpace.MyClase&#8217; tiene un campo estático &#8216;&lt;&gt;9__CachedAnonymousMethodDelegate1&#8242;. Los atributos de campos estáticos de ensamblados safe deben estar marcados como readonly en Visual C#, ReadOnly en Visual Basic o initonly en Visual C++ y el lenguaje intermedio. NameSpace.MyClase</em></p>
<p>La solución es marcar la Clase con el Atributo [System.Runtime.CompilerServices.CompilerGenerated]</p>
</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:dc623cf3-afe7-4b8b-9de7-b104e8d6cc58" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#000000;">[System.Runtime.CompilerServices.CompilerGenerated]
</span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">partial</span><span style="color:#000000;"> </span><span style="color:#0000FF;">class</span><span style="color:#000000;"> StoredProcedures
{
    [SqlProcedure]
    </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">void</span><span style="color:#000000;"> MyProcedure(SqlChars XmlRQ)
    {}
}</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
</p>
<p>Si tienes la clase marcada con ese atributo ya puedes usar delegados.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2007/11/20/metodos-anonimos-y-sqlclr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft SQL Server 2008 CTP y Visual Studio 2005 Support for SQL Server 2008 CTP</title>
		<link>http://www.thedotnetway.net/2007/11/20/microsoft-sql-server-2008-ctp-y-visual-studio-2005-support/</link>
		<comments>http://www.thedotnetway.net/2007/11/20/microsoft-sql-server-2008-ctp-y-visual-studio-2005-support/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 15:32:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2007/11/20/microsoft-sql-server-2008-ctp-y-visual-studio-2005-support/</guid>
		<description><![CDATA[Con tanto revuelo con el VS 2008 y el framework 3.5 nos hemos olvidado de algunas cosas. Se ha liberado el CTP de Noviembre de SQL Server 2008 y además se ha liberado el CTP del soporte de SQL2008 en VS 2005]]></description>
			<content:encoded><![CDATA[<p>Con tanto revuelo con el VS 2008 y el framework 3.5 nos hemos olvidado de algunas cosas.</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e1109aef-1aa2-408d-aa0f-9df094f993bf&amp;displaylang=en"><img src="http://www.thedotnetway.net/content/binary/sqlserver2008box.jpg" border="0" /><img src="http://www.thedotnetway.net/content/binary/vs2005box.jpg" border="0" /></a></p>
<p>Se ha liberado el <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3BF4C5CA-B905-4EBC-8901-1D4C1D1DA884&amp;displaylang=en">CTP de Noviembre de SQL Server 2008</a> y además se ha liberado el <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3BF4C5CA-B905-4EBC-8901-1D4C1D1DA884&amp;displaylang=en">CTP del soporte de SQL2008 en VS 2005</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2007/11/20/microsoft-sql-server-2008-ctp-y-visual-studio-2005-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explicaci&#243;n visual de SQL Joins</title>
		<link>http://www.thedotnetway.net/2007/10/23/explicacion-visual-de-sql-joins/</link>
		<comments>http://www.thedotnetway.net/2007/10/23/explicacion-visual-de-sql-joins/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 09:27:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2007/10/23/explicacion-visual-de-sql-joins/</guid>
		<description><![CDATA[Un artículo en Coding Horror que me ha gustado mucho que explica de forma intuitiva y gráfica los joins en SQL. &#160;A Visual Explanation of SQL Joins]]></description>
			<content:encoded><![CDATA[<p>Un <a href="http://www.codinghorror.com/blog/archives/000976.html">artículo</a> en <a href="http://www.codinghorror.com">Coding Horror</a> que me ha gustado mucho que explica de forma intuitiva y gráfica los joins en SQL.</p>
<p><a href="http://www.codinghorror.com/blog/archives/000976.html"><img src="http://www.thedotnetway.net/content/binary/joins112.PNG" border="0" /></a></p>
<p>&#160;<a href="http://www.codinghorror.com/blog/archives/000976.html">A Visual Explanation of SQL Joins</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2007/10/23/explicacion-visual-de-sql-joins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

