# C1.DataConnector.AdoNet.C1DataAdapterBase-1.GetBatchedRecordsAffected

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataConnector_AdoNet_C1DataAdapterBase_1_GetBatchedRecordsAffected_" data-uid="C1.DataConnector.AdoNet.C1DataAdapterBase`1.GetBatchedRecordsAffected*">GetBatchedRecordsAffected Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataConnector_AdoNet_C1DataAdapterBase_1_GetBatchedRecordsAffected_" data-uid="C1.DataConnector.AdoNet.C1DataAdapterBase`1.GetBatchedRecordsAffected*"></a>
<h4 id="C1_DataConnector_AdoNet_C1DataAdapterBase_1_GetBatchedRecordsAffected_System_Int32_System_Int32__System_Exception__" data-uid="C1.DataConnector.AdoNet.C1DataAdapterBase`1.GetBatchedRecordsAffected(System.Int32,System.Int32@,System.Exception@)">GetBatchedRecordsAffected(int, out int, out Exception)</h4>
<div class="markdown level1 summary"><p>Called to retrieve the records affected from a specific batched command,
first argument is the value that was returned by AddToBatch when it
was called for the command.
Default implementation always returns 1, derived classes override for otherwise
otherwise DbConcurrencyException will only be thrown if sum of all records in batch is 0.
return 0 to cause Update to throw DbConcurrencyException</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected override bool GetBatchedRecordsAffected(int commandIdentifier, out int recordsAffected, out Exception error)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overrides Function GetBatchedRecordsAffected(commandIdentifier As Integer, ByRef recordsAffected As Integer, ByRef [error] As Exception) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">commandIdentifier</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">recordsAffected</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a></td>
      <td><span class="parametername">error</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbdataadapter.getbatchedrecordsaffected">DbDataAdapter.GetBatchedRecordsAffected(int, out int, out Exception)</a></div>
</div>
