dotConnect for BigCommerce Documentation
Devart.Data.Bigcommerce Namespace / BigcommerceCommand Class / Connection Property
Example

In This Topic
    Connection Property (BigcommerceCommand)
    In This Topic
    Gets or sets the BigcommerceConnection used by this instance of the BigcommerceCommand.
    Syntax
    'Declaration
     
    Public Shadows Property Connection As BigcommerceConnection
    public new BigcommerceConnection Connection {get; set;}

    Property Value

    The connection to a data source. The default value is a null reference.
    Remarks

    BigcommerceConnection specified in this property will carry out all operations executed with this BigcommerceCommand.

    This property supports the InterForm technology.

    Example
    The following example creates a BigcommerceCommand and sets some of its properties.
    public void CreateCommand()
    {
      string mySelectQuery = "SELECT * FROM customers ORDER BY id";
      BigcommerceCommand bigcommerceCommand = new BigcommerceCommand(mySelectQuery);
      bigcommerceCommand.Connection = new BigcommerceConnection(
        "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;");
      bigcommerceCommand.CommandType = System.Data.CommandType.Text;
    }
    Public Sub CreateCommand()
      Dim mySelectQuery As String = _
        "SELECT * FROM customers ORDER BY id"
      Dim bigcommerceCommand As New BigcommerceCommand(mySelectQuery)
      bigcommerceCommand.Connection = New BigcommerceConnection( _
        "Server=https://bigcommerce-store.mybigcommerce.com/api/v2/;User Id=User;Authentication Token=qweASDzcx1234567890rtyuiqweASDzcx1234567;")
      bigcommerceCommand.CommandType = System.Data.CommandType.Text
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also