dotConnect for Salesforce Marketing Cloud Documentation
Devart.Data.ExactTarget Namespace / ExactTargetConnection Class / ExactTargetConnection Constructor / ExactTargetConnection Constructor()
Example

In This Topic
    ExactTargetConnection Constructor()
    In This Topic
    Initializes a new instance of the ExactTargetConnection class.
    Syntax
    'Declaration
     
    Public Function New()
    public ExactTargetConnection()
    Remarks
    When a new instance of ExactTargetConnection 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 ExactTargetConnection.
    public void CreateExactTargetConnection()
    {
      ExactTargetConnection exactTargetConnection = new ExactTargetConnection();
      exactTargetConnection.ConnectionString = 
          "user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;";
      exactTargetConnection.Open();
      //Do something
      exactTargetConnection.Close();
    }
    Public Sub CreateExactTargetConnection()
      Dim exactTargetConnection As New ExactTargetConnection()
      exactTargetConnection.ConnectionString = _ 
          "user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;"
      exactTargetConnection.Open()
      'Do something
      exactTargetConnection.Close()
    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