# C1.AdoNet.CSV.C1CSVConnection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_AdoNet_CSV_C1CSVConnection" data-uid="C1.AdoNet.CSV.C1CSVConnection" class="text-break">C1CSVConnection Class
</h1>
  <div class="markdown level0 summary"><pre><code>&lt;xref href=&quot;C1.AdoNet.CSV.C1CSVConnection&quot; data-throw-if-not-resolved=&quot;false&quot;&gt;&lt;/xref&gt; represents a connection to a CSV server. 
</code></pre>
<p>The connection can be used to query the data hosted by the server or request modifications.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a></div>
    <div class="level4"><a class="xref" href="C1.DataConnector.AdoNet.C1ConnectionBase.html">C1ConnectionBase</a></div>
    <div class="level5"><a class="xref" href="C1.DataConnector.AdoNet.C1ConnectionBase-1.html">C1ConnectionBase</a>&lt;<a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.html">C1CSVConnection</a>&gt;</div>
    <div class="level6"><span class="xref">C1CSVConnection</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.idbconnection">IDbConnection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iasyncdisposable">IAsyncDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.AdoNet.CSV.html">C1.AdoNet.CSV</a></h6>
  <h6><strong>Assembly</strong>: C1.AdoNet.CSV.dll</h6>
  <h5 id="C1_AdoNet_CSV_C1CSVConnection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class C1CSVConnection : C1ConnectionBase&lt;C1CSVConnection&gt;, IComponent, IDbConnection, IDisposable, IAsyncDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class C1CSVConnection
    Inherits C1ConnectionBase(Of C1CSVConnection)
    Implements IComponent, IDbConnection, IDisposable, IAsyncDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection__ctor" data-uid="C1.AdoNet.CSV.C1CSVConnection.#ctor">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.-ctor.html#C1_AdoNet_CSV_C1CSVConnection__ctor">C1CSVConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.html">C1CSVConnection</a> instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection__ctor_C1_AdoNet_CSV_C1CSVConnectionStringBuilder_" data-uid="C1.AdoNet.CSV.C1CSVConnection.#ctor(C1.AdoNet.CSV.C1CSVConnectionStringBuilder)">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.-ctor.html#C1_AdoNet_CSV_C1CSVConnection__ctor_C1_AdoNet_CSV_C1CSVConnectionStringBuilder_">C1CSVConnection(C1CSVConnectionStringBuilder)</a>
        </td>
        <td class="markdown level1 summary"><p>Initialize a new <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.html">C1CSVConnection</a> instance using the specified connection string
expressed in a <a class="xref" href="C1.AdoNet.CSV.C1CSVConnectionStringBuilder.html">C1CSVConnectionStringBuilder</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection__ctor_System_String_" data-uid="C1.AdoNet.CSV.C1CSVConnection.#ctor(System.String)">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.-ctor.html#C1_AdoNet_CSV_C1CSVConnection__ctor_System_String_">C1CSVConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initialize a new <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.html">C1CSVConnection</a> instance using the specified connection string.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_ApiConfigFile" data-uid="C1.AdoNet.CSV.C1CSVConnection.ApiConfigFile">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.ApiConfigFile.html#C1_AdoNet_CSV_C1CSVConnection_ApiConfigFile">ApiConfigFile</a>
        </td>
        <td class="markdown level1 summary"><p>The path to the config file for http/https Json source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_ContainsHeaders" data-uid="C1.AdoNet.CSV.C1CSVConnection.ContainsHeaders">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.ContainsHeaders.html#C1_AdoNet_CSV_C1CSVConnection_ContainsHeaders">ContainsHeaders</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean indicating whether the CSV contains headers or not.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_DataSource" data-uid="C1.AdoNet.CSV.C1CSVConnection.DataSource">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.DataSource.html#C1_AdoNet_CSV_C1CSVConnection_DataSource">DataSource</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the name of the database server to which to connect.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_Database" data-uid="C1.AdoNet.CSV.C1CSVConnection.Database">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.Database.html#C1_AdoNet_CSV_C1CSVConnection_Database">Database</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the name of the current database after a connection is opened,
or the database name specified in the connection string before the connection is opened.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_ServerVersion" data-uid="C1.AdoNet.CSV.C1CSVConnection.ServerVersion">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.ServerVersion.html#C1_AdoNet_CSV_C1CSVConnection_ServerVersion">ServerVersion</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a string that represents the version of the server to which the object is connected.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_TrimValues" data-uid="C1.AdoNet.CSV.C1CSVConnection.TrimValues">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.TrimValues.html#C1_AdoNet_CSV_C1CSVConnection_TrimValues">TrimValues</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean indicating whether to trim the values of fields or not.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_Uri" data-uid="C1.AdoNet.CSV.C1CSVConnection.Uri">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.Uri.html#C1_AdoNet_CSV_C1CSVConnection_Uri">Uri</a>
        </td>
        <td class="markdown level1 summary"><p>The Uniform Resource Identifier (URI) for the CSV resource location.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_BeginDbTransaction_System_Data_IsolationLevel_" data-uid="C1.AdoNet.CSV.C1CSVConnection.BeginDbTransaction(System.Data.IsolationLevel)">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.BeginDbTransaction.html#C1_AdoNet_CSV_C1CSVConnection_BeginDbTransaction_System_Data_IsolationLevel_">BeginDbTransaction(IsolationLevel)</a>
        </td>
        <td class="markdown level1 summary"><p>Begins a transaction on the connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_ChangeDatabase_System_String_" data-uid="C1.AdoNet.CSV.C1CSVConnection.ChangeDatabase(System.String)">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.ChangeDatabase.html#C1_AdoNet_CSV_C1CSVConnection_ChangeDatabase_System_String_">ChangeDatabase(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the current database for an open connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_Close" data-uid="C1.AdoNet.CSV.C1CSVConnection.Close">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.Close.html#C1_AdoNet_CSV_C1CSVConnection_Close">Close()</a>
        </td>
        <td class="markdown level1 summary"><p>Closes the connection to the database. This is the preferred method of closing any open connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_CreateDbCommand" data-uid="C1.AdoNet.CSV.C1CSVConnection.CreateDbCommand">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.CreateDbCommand.html#C1_AdoNet_CSV_C1CSVConnection_CreateDbCommand">CreateDbCommand()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates and returns a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbcommand">DbCommand</a> object associated with the current connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_GetColumnsSchema_System_String___" data-uid="C1.AdoNet.CSV.C1CSVConnection.GetColumnsSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.GetColumnsSchema.html#C1_AdoNet_CSV_C1CSVConnection_GetColumnsSchema_System_String___">GetColumnsSchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the columns.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_GetPrimaryKeySchema_System_String___" data-uid="C1.AdoNet.CSV.C1CSVConnection.GetPrimaryKeySchema(System.String[])">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.GetPrimaryKeySchema.html#C1_AdoNet_CSV_C1CSVConnection_GetPrimaryKeySchema_System_String___">GetPrimaryKeySchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the primary keys.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_GetTablesSchema_System_String___" data-uid="C1.AdoNet.CSV.C1CSVConnection.GetTablesSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.GetTablesSchema.html#C1_AdoNet_CSV_C1CSVConnection_GetTablesSchema_System_String___">GetTablesSchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the tables.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_OnConnectionStringChanged" data-uid="C1.AdoNet.CSV.C1CSVConnection.OnConnectionStringChanged">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.OnConnectionStringChanged.html#C1_AdoNet_CSV_C1CSVConnection_OnConnectionStringChanged">OnConnectionStringChanged()</a>
        </td>
        <td class="markdown level1 summary"><p>A method that is executed everytime that the connection string used by this <a class="xref" href="C1.AdoNet.CSV.C1CSVConnectionStringBuilder.html">C1CSVConnectionStringBuilder</a> has changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_Open" data-uid="C1.AdoNet.CSV.C1CSVConnection.Open">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.Open.html#C1_AdoNet_CSV_C1CSVConnection_Open">Open()</a>
        </td>
        <td class="markdown level1 summary"><p>Opens a database connection with the settings specified by the connection string.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_CSV_C1CSVConnection_OpenAsync_System_Threading_CancellationToken_" data-uid="C1.AdoNet.CSV.C1CSVConnection.OpenAsync(System.Threading.CancellationToken)">
          <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.OpenAsync.html#C1_AdoNet_CSV_C1CSVConnection_OpenAsync_System_Threading_CancellationToken_">OpenAsync(CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>An asynchronous version of <a class="xref" href="C1.AdoNet.CSV.C1CSVConnection.Open.html#C1_AdoNet_CSV_C1CSVConnection_Open">Open()</a> open.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
