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
    See Also