# C1.DataEngine.Connector.AddNewColumns

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataEngine_Connector_AddNewColumns_" data-uid="C1.DataEngine.Connector.AddNewColumns*">AddNewColumns Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataEngine_Connector_AddNewColumns_" data-uid="C1.DataEngine.Connector.AddNewColumns*"></a>
<h4 id="C1_DataEngine_Connector_AddNewColumns_System_String_System_Int64_" data-uid="C1.DataEngine.Connector.AddNewColumns(System.String,System.Int64)">AddNewColumns(string, long)</h4>
<div class="markdown level1 summary"><p>Add new columns to an existing DataEngine table.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public abstract long AddNewColumns(string tableName, long count = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public MustOverride Function AddNewColumns(tableName As String, Optional count As Long = 0) As Long</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.string">string</a></td>
      <td><span class="parametername">tableName</span></td>
      <td><p>The name of the DataEngine table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>Optional number of rows to import. If count is 0 (default), import all rows.</p>
</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.int64">long</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_DataEngine_Connector_AddNewColumns_System_String_System_Int64__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method throws an exception if the specified columns already exist.</p>
</div>


<a id="C1_DataEngine_Connector_AddNewColumns_" data-uid="C1.DataEngine.Connector.AddNewColumns*"></a>
<h4 id="C1_DataEngine_Connector_AddNewColumns_C1_DataEngine_Workspace_System_Data_IDataReader_System_String_System_Int64_" data-uid="C1.DataEngine.Connector.AddNewColumns(C1.DataEngine.Workspace,System.Data.IDataReader,System.String,System.Int64)">AddNewColumns(Workspace, IDataReader, string, long)</h4>
<div class="markdown level1 summary"><p>Add new columns to an existing DataEngine table.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static long AddNewColumns(Workspace workspace, IDataReader reader, string tableName, long count = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function AddNewColumns(workspace As Workspace, reader As IDataReader, tableName As String, Optional count As Long = 0) As Long</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="C1.DataEngine.Workspace.html">Workspace</a></td>
      <td><span class="parametername">workspace</span></td>
      <td><p>Workspace containing the DataEngine table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.idatareader">IDataReader</a></td>
      <td><span class="parametername">reader</span></td>
      <td><p>Reader providing the data for the new columns.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">tableName</span></td>
      <td><p>The name of the DataEngine table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>Optional number of rows to import. If count is 0 (default), import all rows.</p>
</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.int64">long</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_DataEngine_Connector_AddNewColumns_C1_DataEngine_Workspace_System_Data_IDataReader_System_String_System_Int64__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method throws an exception if the specified columns already exist.</p>
</div>
</div>
