<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>artiso Blog - ADO.Net</title>
    <link>http://www.artiso.com/ProBlog/</link>
    <description>Neues rund um's Thema .Net</description>
    <language>de-de</language>
    <copyright>Thomas</copyright>
    <lastBuildDate>Fri, 13 Feb 2009 11:13:52 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>tschissler@artiso.com</managingEditor>
    <webMaster>tschissler@artiso.com</webMaster>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c452a3fe-3660-44ca-b998-c392d0c6944b</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c452a3fe-3660-44ca-b998-c392d0c6944b.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c452a3fe-3660-44ca-b998-c392d0c6944b.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c452a3fe-3660-44ca-b998-c392d0c6944b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/DaruiszParysbeider.NetDeveloperGroupUlm_ABBC/clip_image001_2.gif">
            <img title="clip_image001" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="108" alt="clip_image001" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/DaruiszParysbeider.NetDeveloperGroupUlm_ABBC/clip_image001_thumb.gif" width="783" border="0" />
          </a>
        </p>
        <p>
Beim nächsten Treffen der .Net Developer-Group Ulm dürfen wir diesesmal Dariusz Parys
begrüßen, der zum Thema “Architektur der Datenanbindungsschicht, insbesondere ADO.NET
Data Services und Entity Framework” spricht. Der Abstract verspricht schon mal einen
sehr spannenden Abend:
</p>
        <blockquote>
          <p>
LINQ to SQL, ADO.NET, Entity Framework, Entity Data Model, REST mit ADO.NET Data Services
oder Serialisierung mit WCF ? – neben einem Überblick über die Alternativen und detailliertere
Darstellung des Entity Frameworks wird darauf eingegangen, welche Kriterien beim O/R-Mapping
zur Bewertung zur Verfügung stehen und diskutiert, welcher Nutzen darin liegt, die
Datenanbindung von einer technischen Ebene auf eine logische zu heben.
</p>
        </blockquote>
        <p>
Ích glaube das dürfte ein Themengebiet sein mit dem im Moment jeder Entwickler in
irgendeiner Weise käpft und so dürfte sich Dariusz schon mal auf eine ganze Reihe
von Fragen einstellen (Mir selbst fallen da schon eine ganze Reihe ein). 
</p>
        <p>
Wer also Interesse an dem Thema hat, ist herzlich eingeladen am Dienstag 17.02.2008
um 18:00 zu uns zu kommen.
</p>
        <p>
Weitere Infos unter:
</p>
        <p>
          <a href="http://www.dotnet-ulm.de">http://www.dotnet-ulm.de</a>
        </p>
        <p>
 
</p>
        <p>
          <font face="Times New Roman" size="3"> </font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c452a3fe-3660-44ca-b998-c392d0c6944b" />
      </body>
      <title>Daruisz Parys bei der .Net Developer-Group Ulm</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c452a3fe-3660-44ca-b998-c392d0c6944b.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c452a3fe-3660-44ca-b998-c392d0c6944b.aspx</link>
      <pubDate>Fri, 13 Feb 2009 11:13:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/DaruiszParysbeider.NetDeveloperGroupUlm_ABBC/clip_image001_2.gif"&gt;&lt;img title="clip_image001" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="108" alt="clip_image001" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/DaruiszParysbeider.NetDeveloperGroupUlm_ABBC/clip_image001_thumb.gif" width="783" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Beim nächsten Treffen der .Net Developer-Group Ulm dürfen wir diesesmal Dariusz Parys
begrüßen, der zum Thema “Architektur der Datenanbindungsschicht, insbesondere ADO.NET
Data Services und Entity Framework” spricht. Der Abstract verspricht schon mal einen
sehr spannenden Abend:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
LINQ to SQL, ADO.NET, Entity Framework, Entity Data Model, REST mit ADO.NET Data Services
oder Serialisierung mit WCF ? – neben einem Überblick über die Alternativen und detailliertere
Darstellung des Entity Frameworks wird darauf eingegangen, welche Kriterien beim O/R-Mapping
zur Bewertung zur Verfügung stehen und diskutiert, welcher Nutzen darin liegt, die
Datenanbindung von einer technischen Ebene auf eine logische zu heben.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Ích glaube das dürfte ein Themengebiet sein mit dem im Moment jeder Entwickler in
irgendeiner Weise käpft und so dürfte sich Dariusz schon mal auf eine ganze Reihe
von Fragen einstellen (Mir selbst fallen da schon eine ganze Reihe ein). 
&lt;/p&gt;
&lt;p&gt;
Wer also Interesse an dem Thema hat, ist herzlich eingeladen am Dienstag 17.02.2008
um 18:00 zu uns zu kommen.
&lt;/p&gt;
&lt;p&gt;
Weitere Infos unter:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.dotnet-ulm.de"&gt;http://www.dotnet-ulm.de&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c452a3fe-3660-44ca-b998-c392d0c6944b" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c452a3fe-3660-44ca-b998-c392d0c6944b.aspx</comments>
      <category>.Net 3.5;ADO.Net;Architektur;Know-How;Vorträge</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=102fa38f-aeca-4fea-a894-251d1a5938cd</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,102fa38f-aeca-4fea-a894-251d1a5938cd.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,102fa38f-aeca-4fea-a894-251d1a5938cd.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=102fa38f-aeca-4fea-a894-251d1a5938cd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://forums.asp.net/members/Scott-Mitchell.aspx">
            <em>
              <u>
                <font color="#0066cc">Scott
Mitchell</font>
              </u>
            </em>
          </a> hat 75 Tutorials zum Thema Data Access mit ASP.Net
2.0 geschrieben. Hier ist praktisch alles an Technologie beschrieben, was für die
Programmierung von datenbankbasierten Webanwendungen mit ASP.Net 2.0 notwendig ist.
Einzig LINQ wird momentan noch ausgespart. Eine wirklich tolle Sammlung an guten
Informationen.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ASP.Net2.0DataAccessTutorials_9BA5/image.png" atomicselection="true">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="373" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ASP.Net2.0DataAccessTutorials_9BA5/image_thumb.png" width="598" border="0" />
          </a>
        </p>
        <p>
          <a href="http://www.asp.net/learn/data-access/?lang=cs">Data Access Tutorials : The
Official Microsoft ASP.NET 2.0 Site</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=102fa38f-aeca-4fea-a894-251d1a5938cd" />
      </body>
      <title>ASP.Net 2.0 Data Access Tutorials</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,102fa38f-aeca-4fea-a894-251d1a5938cd.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,102fa38f-aeca-4fea-a894-251d1a5938cd.aspx</link>
      <pubDate>Thu, 16 Aug 2007 09:06:18 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://forums.asp.net/members/Scott-Mitchell.aspx"&gt;&lt;em&gt;&lt;u&gt;&lt;font color=#0066cc&gt;Scott
Mitchell&lt;/font&gt;&lt;/u&gt;&lt;/em&gt;&lt;/a&gt;&amp;nbsp;hat 75 Tutorials zum Thema Data Access mit ASP.Net
2.0 geschrieben. Hier ist praktisch alles an Technologie beschrieben, was für die
Programmierung von datenbankbasierten Webanwendungen mit ASP.Net 2.0 notwendig ist.
Einzig LINQ wird momentan noch ausgespart.&amp;nbsp;Eine wirklich tolle Sammlung an guten
Informationen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ASP.Net2.0DataAccessTutorials_9BA5/image.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=373 alt=image src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ASP.Net2.0DataAccessTutorials_9BA5/image_thumb.png" width=598 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.asp.net/learn/data-access/?lang=cs"&gt;Data Access Tutorials : The
Official Microsoft ASP.NET 2.0 Site&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=102fa38f-aeca-4fea-a894-251d1a5938cd" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,102fa38f-aeca-4fea-a894-251d1a5938cd.aspx</comments>
      <category>ADO.Net;ASP.Net;Know-How;Lernen;SQL</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hat man ein typisiertes DataSet und arbeitet darin mit mehreren TableAdaptern, dann stellt
sich die Frage, wie Updates auf diesen TableAdaptern in eine Transaktion zusammengefasst
werden können. Das Problem dabei ist, dass jeder TableAdapter seine eigene Connection
nutzt. Es gibt grundsätzlich zwei Lösungsansätze:
</p>
        <ol>
          <li>
Man verwendet den TransactionScope aus dem System.Transactions-Namespace. Diese Vorgehensweise
hat allerdings den Nachteil, dass die verschiedenen Connections nur über eine
Distributed Transactions verwaltet werden können. Das ist nicht unbedingt das
Nonplusultra was die Performance angeht und eigentlich ja auch mit Kanonen auf Spatzen
geschossen, da typischerweise alle TableAdapter ja auf die gleiche Datenbank gehen
dürften und damit die Ditributed Transactions etwas überkandidelt sind.<br /></li>
          <li>
Man verwendet eine Connection für alle TableAdpater. Hierzu gibt es glücklicherweise
die Möglichkiet, dass man die Connection der Tableadapter austauschen kann. Man kann
z.B. einfach die Connection des ersten TableAdapters allen anderen zuweisen und dann
auf dieser Connection mit BeginTransaction eine neue Transaktion beginnen und diese
dann mit Commit bzw. RollBack abschließen. Alternativ kann man natürlich auch manuell
eine Connection erzeugen und diese dann allen TableAdaptern zuweisen.</li>
        </ol>
        <p>
Eine sehr schöne Beschreibung dieser Lösungsansätze hat John Waters unter folgendem
Link veröffentlicht: <a href="http://www.falafel.com/community/blogs/adonet/archive/2007/04/10/getting-tableadapters-to-participate-in-transactions.aspx">ADO.NET
: Getting TableAdapters to participate in transactions</a></p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e" />
      </body>
      <title>TableAdapter typisierter DataSets und Transaktionen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e.aspx</link>
      <pubDate>Thu, 26 Jul 2007 16:05:23 GMT</pubDate>
      <description>&lt;p&gt;
Hat man ein typisiertes DataSet und arbeitet darin mit mehreren TableAdaptern, dann&amp;nbsp;stellt
sich die Frage,&amp;nbsp;wie Updates auf diesen TableAdaptern in eine Transaktion zusammengefasst
werden können. Das Problem dabei ist, dass jeder TableAdapter seine eigene Connection
nutzt. Es gibt grundsätzlich zwei Lösungsansätze:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Man verwendet den TransactionScope aus dem System.Transactions-Namespace. Diese Vorgehensweise
hat allerdings den Nachteil, dass die verschiedenen Connections&amp;nbsp;nur über eine
Distributed&amp;nbsp;Transactions verwaltet werden können. Das ist nicht unbedingt das
Nonplusultra was die Performance angeht und eigentlich ja auch mit Kanonen auf Spatzen
geschossen, da typischerweise alle TableAdapter ja auf die gleiche Datenbank gehen
dürften und damit die Ditributed Transactions etwas überkandidelt sind.&lt;br&gt;
&lt;li&gt;
Man verwendet eine Connection für alle TableAdpater. Hierzu gibt es glücklicherweise
die Möglichkiet, dass man die Connection der Tableadapter austauschen kann. Man kann
z.B. einfach die Connection des ersten TableAdapters allen anderen zuweisen und dann
auf dieser Connection mit BeginTransaction eine neue Transaktion beginnen und diese
dann mit Commit bzw. RollBack abschließen. Alternativ kann man natürlich auch manuell
eine Connection erzeugen und diese dann allen TableAdaptern zuweisen.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Eine sehr schöne Beschreibung dieser Lösungsansätze hat John Waters unter folgendem
Link veröffentlicht: &lt;a href="http://www.falafel.com/community/blogs/adonet/archive/2007/04/10/getting-tableadapters-to-participate-in-transactions.aspx"&gt;ADO.NET
: Getting TableAdapters to participate in transactions&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,f5b9a6b1-417b-4b6b-a0b3-e272ede9ce0e.aspx</comments>
      <category>ADO.Net;Know-How</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=88f4d291-5e6b-40e0-b0bd-8ca803fea8c7</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,88f4d291-5e6b-40e0-b0bd-8ca803fea8c7.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,88f4d291-5e6b-40e0-b0bd-8ca803fea8c7.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=88f4d291-5e6b-40e0-b0bd-8ca803fea8c7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Enthält auch das Entity Framework. Damit soll OR-Mapping in ADO.Net integriert werden.
</p>
        <p>
          <a href="http://blogs.msdn.com/adonet/archive/2006/08/15/701479.aspx">http://blogs.msdn.com/adonet/archive/2006/08/15/701479.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=88f4d291-5e6b-40e0-b0bd-8ca803fea8c7" />
      </body>
      <title>ADO.NET vNext August CTP ist verfügbar</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,88f4d291-5e6b-40e0-b0bd-8ca803fea8c7.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,88f4d291-5e6b-40e0-b0bd-8ca803fea8c7.aspx</link>
      <pubDate>Sat, 19 Aug 2006 07:51:51 GMT</pubDate>
      <description>&lt;p&gt;
Enthält auch das Entity Framework. Damit soll OR-Mapping in ADO.Net integriert werden.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/adonet/archive/2006/08/15/701479.aspx"&gt;http://blogs.msdn.com/adonet/archive/2006/08/15/701479.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=88f4d291-5e6b-40e0-b0bd-8ca803fea8c7" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,88f4d291-5e6b-40e0-b0bd-8ca803fea8c7.aspx</comments>
      <category>ADO.Net;Unbearbeitet</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=b20b7b2c-5d64-408f-ac2e-8719fd08ac49</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,b20b7b2c-5d64-408f-ac2e-8719fd08ac49.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,b20b7b2c-5d64-408f-ac2e-8719fd08ac49.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=b20b7b2c-5d64-408f-ac2e-8719fd08ac49</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="bul">
          <b>Mit Hilfe der Eigenschaft UpdateBatchSize kann eingestellt werden, wieviele Update-Befehle
beim Updaten eines Datasets in die Datenbank zusammengefasst werden sollen.</b>
        </p>
        <p class="bul">
          <b>DataAdapter and Batch Updates</b>. In the previous version of ADO.NET, when updating
a database with changes from a DataSet, the <b>Update</b> method of a DataAdapter
performs updates to the database one row at a time.
</p>
        <p class="bul">
As the method iterates through the rows in the specified DataTable, it examines each
DataRow to see if the row has been modified. If the row has been modified, the method
calls the appropriate <b>UpdateCommand</b>, <b>InsertCommand</b> or <b>DeleteCommand</b>,
depending on the value of the <b>RowState</b> property for that row. Every row update
involves a network round-trip to the database.
</p>
        <p class="bul">
In ADO.NET 2.0, the DataAdapter exposes an <b>UpdateBatchSize</b> property. Setting
the property to a positive integer value causes updates to the database to be sent
as batches of the specified size. For example, setting the UpdateBatchSize to 10 will
group 10 separate statements and submit them as a single batch. Setting the UpdateBatchSize
to 0 will cause the DataAdapter to use the largest batch size that the server can
handle. Setting it to 1 disables batch updates as rows are sent one at a time.
</p>
        <p class="bul">
          <b>Event Behavior Changes with Batch Updates</b>. The <b>DataAdapter</b> class has
two update-related events i.e. <b>RowUpdating</b> and <b>RowUpdated</b>. In previous
versions of ADO.NET, and when batch processing is disabled, each of these events is
generated once for each row processed. RowUpdating is generated before the update
occurs, and RowUpdated is generated after the database update is completed.
</p>
        <p class="bul">
When batch processing is enabled, multiple rows are updated in a single database operation.
Therefore, only one <b>RowUpdated</b> event occurs for each batch, whereas the <b>RowUpdating</b> event
occurs for each row processed.
</p>
        <p class="bul">
When batch processing is disabled, the two events are fired with one-to-one interleaving
where one <b>RowUpdating</b> event and one <b>RowUpdated</b> event fire for a row,
then one <b>RowUpdating</b> and one <b>RowUpdated</b> event fire for the next row,
until all of the rows are processed.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b20b7b2c-5d64-408f-ac2e-8719fd08ac49" />
      </body>
      <title>BatchUpdate auf Datenbanken</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,b20b7b2c-5d64-408f-ac2e-8719fd08ac49.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,b20b7b2c-5d64-408f-ac2e-8719fd08ac49.aspx</link>
      <pubDate>Fri, 07 Jul 2006 16:37:41 GMT</pubDate>
      <description>&lt;p class=bul&gt;
&lt;b&gt;Mit Hilfe der Eigenschaft UpdateBatchSize kann eingestellt werden, wieviele Update-Befehle
beim Updaten eines Datasets in die Datenbank zusammengefasst werden sollen.&lt;/b&gt;
&lt;/p&gt;
&lt;p class=bul&gt;
&lt;b&gt;DataAdapter and Batch Updates&lt;/b&gt;. In the previous version of ADO.NET, when updating
a database with changes from a DataSet, the &lt;b&gt;Update&lt;/b&gt; method of a DataAdapter
performs updates to the database one row at a time.
&lt;/p&gt;
&lt;p class=bul&gt;
As the method iterates through the rows in the specified DataTable, it examines each
DataRow to see if the row has been modified. If the row has been modified, the method
calls the appropriate &lt;b&gt;UpdateCommand&lt;/b&gt;, &lt;b&gt;InsertCommand&lt;/b&gt; or &lt;b&gt;DeleteCommand&lt;/b&gt;,
depending on the value of the &lt;b&gt;RowState&lt;/b&gt; property for that row. Every row update
involves a network round-trip to the database.
&lt;/p&gt;
&lt;p class=bul&gt;
In ADO.NET 2.0, the DataAdapter exposes an &lt;b&gt;UpdateBatchSize&lt;/b&gt; property. Setting
the property to a positive integer value causes updates to the database to be sent
as batches of the specified size. For example, setting the UpdateBatchSize to 10 will
group 10 separate statements and submit them as a single batch. Setting the UpdateBatchSize
to 0 will cause the DataAdapter to use the largest batch size that the server can
handle. Setting it to 1 disables batch updates as rows are sent one at a time.
&lt;/p&gt;
&lt;p class=bul&gt;
&lt;b&gt;Event Behavior Changes with Batch Updates&lt;/b&gt;. The &lt;b&gt;DataAdapter&lt;/b&gt; class has
two update-related events i.e. &lt;b&gt;RowUpdating&lt;/b&gt; and &lt;b&gt;RowUpdated&lt;/b&gt;. In previous
versions of ADO.NET, and when batch processing is disabled, each of these events is
generated once for each row processed. RowUpdating is generated before the update
occurs, and RowUpdated is generated after the database update is completed.
&lt;/p&gt;
&lt;p class=bul&gt;
When batch processing is enabled, multiple rows are updated in a single database operation.
Therefore, only one &lt;b&gt;RowUpdated&lt;/b&gt; event occurs for each batch, whereas the &lt;b&gt;RowUpdating&lt;/b&gt; event
occurs for each row processed.
&lt;/p&gt;
&lt;p class=bul&gt;
When batch processing is disabled, the two events are fired with one-to-one interleaving
where one &lt;b&gt;RowUpdating&lt;/b&gt; event and one &lt;b&gt;RowUpdated&lt;/b&gt; event fire for a row,
then one &lt;b&gt;RowUpdating&lt;/b&gt; and one &lt;b&gt;RowUpdated&lt;/b&gt; event fire for the next row,
until all of the rows are processed.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b20b7b2c-5d64-408f-ac2e-8719fd08ac49" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,b20b7b2c-5d64-408f-ac2e-8719fd08ac49.aspx</comments>
      <category>ADO.Net;Know-How</category>
    </item>
  </channel>
</rss>