dotConnect for SugarCRM Documentation
Devart.Data.Sugar Namespace / SugarConnection Class / SugarConnection Constructor / SugarConnection Constructor()
Example

In This Topic
    SugarConnection Constructor()
    In This Topic
    Initializes a new instance of the SugarConnection class.
    Syntax
    'Declaration
     
    Public Function New()
    public SugarConnection()
    Remarks
    When a new instance of SugarConnection 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 SugarConnection.
    public void CreateSugarConnection()
    {
      SugarConnection sugarConnection = new SugarConnection();
      sugarConnection.ConnectionString = 
          "server=https://your_company.sugaropencloud.eu;user id=admin;password=AmFFA4ZryM;";
      sugarConnection.Open();
      //Do something
      sugarConnection.Close();
    }
    Public Sub CreateSugarConnection()
      Dim sugarConnection As New SugarConnection()
      sugarConnection.ConnectionString = _ 
          "server=https://your_company.sugaropencloud.eu;user id=admin;password=AmFFA4ZryM;"
      sugarConnection.Open()
      'Do something
      sugarConnection.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