dotConnect for BigCommerce Documentation
Devart.Data.Bigcommerce Namespace / BigcommerceConnection Class / BigcommerceConnection Constructor / BigcommerceConnection Constructor(String)
The connection used to connect to BigCommerce.
Example

In This Topic
    BigcommerceConnection Constructor(String)
    In This Topic
    Initializes a new instance of the BigcommerceConnection class when given a string containing the connection string.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal connectionString As String _
    )
    public BigcommerceConnection( 
       string connectionString
    )

    Parameters

    connectionString
    The connection used to connect to BigCommerce.
    Remarks
    When a new instance of BigcommerceConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.
    Example
    The following example creates and opens a BigcommerceConnection.
    public void CreateBigcommerceConnection()
    {
      string myConnString = 
          "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;";
      BigcommerceConnection bigcommerceConnection = new BigcommerceConnection(myConnString);
      bigcommerceConnection.Open();
      //Do something
      bigcommerceConnection.Close();
    }
    Public Sub CreateBigcommerceConnection()
      Dim myConnString As String = _
          "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;"
      Dim bigcommerceConnection As New BigcommerceConnection(myConnString)
      bigcommerceConnection.Open()
      'Do something
      bigcommerceConnection.Close()
    End Sub
    See Also