dotConnect for SugarCRM Documentation
Devart.Data.Sugar Namespace / SugarConnection Class / SugarConnection Constructor / SugarConnection Constructor(String)
The connection used to connect to SugarCRM.
Example

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

Parameters

connectionString
The connection used to connect to SugarCRM.
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()
{
  string myConnString = 
      "server=https://your_company.sugaropencloud.eu;user id=admin;password=AmFFA4ZryM;";
  SugarConnection sugarConnection = new SugarConnection(myConnString);
  sugarConnection.Open();
  //Do something
  sugarConnection.Close();
}
Public Sub CreateSugarConnection()
  Dim myConnString As String = _
      "server=https://your_company.sugaropencloud.eu;user id=admin;password=AmFFA4ZryM;"
  Dim sugarConnection As New SugarConnection(myConnString)
  sugarConnection.Open()
  'Do something
  sugarConnection.Close()
End Sub
See Also