# C1.AdoNet.Snowflake.C1SnowflakeConnection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_AdoNet_Snowflake_C1SnowflakeConnection" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection" class="text-break">C1SnowflakeConnection Class
</h1>
  <div class="markdown level0 summary"><pre><code>&lt;xref href=&quot;C1.AdoNet.Snowflake.C1SnowflakeConnection&quot; data-throw-if-not-resolved=&quot;false&quot;&gt;&lt;/xref&gt; represents a connection to a Snowflake 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.AdoNet.CSV/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.Snowflake.C1SnowflakeConnection.html">C1SnowflakeConnection</a>&gt;</div>
    <div class="level6"><span class="xref">C1SnowflakeConnection</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><a class="xref" href="../C1.DataConnector/C1.DataConnector.Interfaces.IExtendedConnection.html">IExtendedConnection</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.AdoNet.Snowflake.html">C1.AdoNet.Snowflake</a></h6>
  <h6><strong>Assembly</strong>: C1.AdoNet.Snowflake.dll</h6>
  <h5 id="C1_AdoNet_Snowflake_C1SnowflakeConnection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class C1SnowflakeConnection : C1ConnectionBase&lt;C1SnowflakeConnection&gt;, IComponent, IDbConnection, IDisposable, IAsyncDisposable, IExtendedConnection</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class C1SnowflakeConnection
    Inherits C1ConnectionBase(Of C1SnowflakeConnection)
    Implements IComponent, IDbConnection, IDisposable, IAsyncDisposable, IExtendedConnection</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_Snowflake_C1SnowflakeConnection__ctor" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.#ctor">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.-ctor.html#C1_AdoNet_Snowflake_C1SnowflakeConnection__ctor">C1SnowflakeConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.html">C1SnowflakeConnection</a> instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection__ctor_C1_AdoNet_Snowflake_C1SnowflakeConnectionStringBuilder_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.#ctor(C1.AdoNet.Snowflake.C1SnowflakeConnectionStringBuilder)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.-ctor.html#C1_AdoNet_Snowflake_C1SnowflakeConnection__ctor_C1_AdoNet_Snowflake_C1SnowflakeConnectionStringBuilder_">C1SnowflakeConnection(C1SnowflakeConnectionStringBuilder)</a>
        </td>
        <td class="markdown level1 summary"><p>Initialize a new <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.html">C1SnowflakeConnection</a> instance using the specified connection string
expressed in a <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnectionStringBuilder.html">C1SnowflakeConnectionStringBuilder</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection__ctor_System_String_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.#ctor(System.String)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.-ctor.html#C1_AdoNet_Snowflake_C1SnowflakeConnection__ctor_System_String_">C1SnowflakeConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initialize a new <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.html">C1SnowflakeConnection</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_Snowflake_C1SnowflakeConnection_Account" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Account">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Account.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Account">Account</a>
        </td>
        <td class="markdown level1 summary"><p>The account of the user in Swnowflake.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_BaseUrl" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.BaseUrl">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.BaseUrl.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_BaseUrl">BaseUrl</a>
        </td>
        <td class="markdown level1 summary"><p>The base url of the Snowflake server.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_DataSource" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.DataSource">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.DataSource.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_Database" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Database">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Database.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_DatabaseConn" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.DatabaseConn">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.DatabaseConn.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_DatabaseConn">DatabaseConn</a>
        </td>
        <td class="markdown level1 summary"><p>The name of the database.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_FingerPrint" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.FingerPrint">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.FingerPrint.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_FingerPrint">FingerPrint</a>
        </td>
        <td class="markdown level1 summary"><p>The finger print of the public key after added in Snowflake server</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_OAuthToken" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.OAuthToken">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.OAuthToken.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_OAuthToken">OAuthToken</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the current access token and refresh token.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_PrivateKey" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.PrivateKey">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.PrivateKey.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_PrivateKey">PrivateKey</a>
        </td>
        <td class="markdown level1 summary"><p>The path of the private key file.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_PrivateKeyPassword" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.PrivateKeyPassword">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.PrivateKeyPassword.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_PrivateKeyPassword">PrivateKeyPassword</a>
        </td>
        <td class="markdown level1 summary"><p>The password of the private key.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_Role" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Role">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Role.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Role">Role</a>
        </td>
        <td class="markdown level1 summary"><p>The role of the user making the request.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_Schema" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Schema">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Schema.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Schema">Schema</a>
        </td>
        <td class="markdown level1 summary"><p>The name of the schema.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_ServerVersion" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.ServerVersion">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.ServerVersion.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_SupportGroupBy" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportGroupBy">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportGroupBy.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_SupportGroupBy">SupportGroupBy</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this C1ODataConnection is using SupportGroupBy.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_SupportLimit" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportLimit">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportLimit.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_SupportLimit">SupportLimit</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this C1ODataConnection is using SupportLimit.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_SupportOrderBy" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportOrderBy">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.SupportOrderBy.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_SupportOrderBy">SupportOrderBy</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this C1ODataConnection is using SupportOrderBy.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_UseDynamicType" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.UseDynamicType">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.UseDynamicType.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_UseDynamicType">UseDynamicType</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this C1ODataConnection is using dynamic type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_Warehouse" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Warehouse">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Warehouse.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Warehouse">Warehouse</a>
        </td>
        <td class="markdown level1 summary"><p>The name of the warehouse.</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_Snowflake_C1SnowflakeConnection_BeginDbTransaction_System_Data_IsolationLevel_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.BeginDbTransaction(System.Data.IsolationLevel)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.BeginDbTransaction.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_ChangeDatabase_System_String_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.ChangeDatabase(System.String)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.ChangeDatabase.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_Close" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Close">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Close.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_CreateDbCommand" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.CreateDbCommand">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.CreateDbCommand.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_Dispose_System_Boolean_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Dispose(System.Boolean)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Dispose.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Dispose the connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_GetColumnsSchema_System_String___" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetColumnsSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetColumnsSchema.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_GetForeignKeySchema_System_String___" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetForeignKeySchema(System.String[])">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetForeignKeySchema.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_GetForeignKeySchema_System_String___">GetForeignKeySchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the foreign keys.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_GetPrimaryKeySchema_System_String___" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetPrimaryKeySchema(System.String[])">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetPrimaryKeySchema.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_GetTablesSchema_System_String___" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetTablesSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.GetTablesSchema.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_OnConnectionStringChanged" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.OnConnectionStringChanged">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.OnConnectionStringChanged.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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.Snowflake.C1SnowflakeConnectionStringBuilder.html">C1SnowflakeConnectionStringBuilder</a> has changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_Open" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.Open">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Open.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_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_Snowflake_C1SnowflakeConnection_OpenAsync_System_Threading_CancellationToken_" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.OpenAsync(System.Threading.CancellationToken)">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.OpenAsync.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_OpenAsync_System_Threading_CancellationToken_">OpenAsync(CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>An asynchronous version of <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.Open.html#C1_AdoNet_Snowflake_C1SnowflakeConnection_Open">Open()</a> open.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_AdoNet_Snowflake_C1SnowflakeConnection_OAuthTokenRefreshed" data-uid="C1.AdoNet.Snowflake.C1SnowflakeConnection.OAuthTokenRefreshed">
          <a class="xref" href="C1.AdoNet.Snowflake.C1SnowflakeConnection.OAuthTokenRefreshed.html">OAuthTokenRefreshed</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs after the token refreshes.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
